Submission #20578

#TimeUsernameProblemLanguageResultExecution timeMemory
20578키-파 (#35)채점 시스템 (OJUZ11_judge)C++98
0 / 100
1000 ms1116 KiB
#include <cstdio> using namespace std; int main() { int n; scanf("%d", &n); while (n--) { int t, p; scanf("%d%d", &t, &p); int temp = t, p10 = 1; while (temp > 0) { p10 *= 10; temp /= 10; } int c = 0; while (p10 + t <= p) { ++c; p10 *= 10; } printf("%d\n", c); } return 0; }

Compilation message (stderr)

judge.cpp: In function 'int main()':
judge.cpp:7:20: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d", &n);
                    ^
judge.cpp:10:30: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("%d%d", &t, &p);
                              ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...