# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
20399 | 2017-02-11T01:56:16 Z | KEIST(#40, keist99) | 채점 시스템 (OJUZ11_judge) | C++ | 1000 ms | 1116 KB |
#include<stdio.h> int findjari(int x, int jari) { if (x==0) return jari; return findjari(x/10, jari+1); } int main() { int query; scanf("%d", &query); while(query--) { int correct, score; scanf("%d %d", &score, &correct); int jari=findjari(score, 0); if (jari==0) jari++; int defaultJari=1; for (int i=1; i<=jari; i++) { defaultJari*=10; } int cnt=0; while(1) { if ((score+defaultJari)>correct) { printf("%d\n", cnt); break; } cnt++; defaultJari*=10; } } return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 33 ms | 1116 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 33 ms | 1116 KB | Output is correct |
2 | Correct | 36 ms | 1116 KB | Output is correct |
3 | Correct | 29 ms | 1116 KB | Output is correct |
4 | Correct | 33 ms | 1116 KB | Output is correct |
5 | Correct | 33 ms | 1116 KB | Output is correct |
6 | Correct | 33 ms | 1116 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 33 ms | 1116 KB | Output is correct |
2 | Correct | 36 ms | 1116 KB | Output is correct |
3 | Correct | 29 ms | 1116 KB | Output is correct |
4 | Correct | 33 ms | 1116 KB | Output is correct |
5 | Correct | 33 ms | 1116 KB | Output is correct |
6 | Correct | 33 ms | 1116 KB | Output is correct |
7 | Execution timed out | 1000 ms | 1116 KB | Execution timed out |
8 | Execution timed out | 1000 ms | 1116 KB | Execution timed out |
9 | Execution timed out | 1000 ms | 1116 KB | Execution timed out |
10 | Execution timed out | 1000 ms | 1116 KB | Execution timed out |
11 | Execution timed out | 1000 ms | 1116 KB | Execution timed out |