Run ID Author Problem Lang Verdict Score Time Memory Code Length Submit Time
74141 陶俊宸 位运算 C++ Accepted 100 0 MS 188 KB 301 2023-05-20 17:17:09

Tests(10/10):


#include<cstdio> bool f; char c[7]; int n,idx; int main(){ scanf("%d",&n); while(n){ c[idx++]=n%10+'0'; n/=10; } for(int i=0;i<6;i++){ if(c[i]>'0'){ c[i]--; break; } } for(int i=5;i>=0;i--){ if(c[i]>'0') f=true; if(f||!i) printf("%c",c[i]); } return 0; }


Judgement Protocol: