Submission #30850

#TimeUsernameProblemLanguageResultExecution timeMemory
30850okaybody10채점 시스템 (OJUZ11_judge)C++98
78 / 100
1000 ms1116 KiB
#include <stdio.h> int wkfltn(int n) { int cnt=0; if(n==0) return 1; while(n) { n/=10; cnt++; } return cnt; } int main() { int T; scanf("%d",&T); while(T--) { int S,P; scanf("%d %d",&P,&S); int wkfl=wkfltn(P); int tenpow=1; for(int i=1;i<=wkfl;i++) tenpow*=10; int zerocount=0; while(1) { if(tenpow+P>S) break; zerocount++; tenpow*=10; } printf("%d\n",zerocount); } return 0; }

Compilation message (stderr)

judge.cpp: In function 'int main()':
judge.cpp:19:19: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d",&T);
                   ^
judge.cpp:23:29: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("%d %d",&P,&S);
                             ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...