# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
20570 | 2017-02-12T11:09:45 Z | G(#74, gs12117) | 채점 시스템 (OJUZ11_judge) | C++11 | 56 ms | 1116 KB |
#include<stdio.h> int digit(long long int x) { if (x < 10)return 1; return digit(x / 10) + 1; } long long int powt(int x) { if (x == 0)return 1; return powt(x - 1) * 10; } int main() { int tcn; scanf("%d", &tcn); while (tcn--) { long long int a, b; scanf("%lld%lld", &a, &b); int ans = 0; while (1) { if (a + powt(ans + digit(a)) > b)break; ans++; } printf("%d\n", ans); } return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 29 ms | 1116 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 29 ms | 1116 KB | Output is correct |
2 | Correct | 33 ms | 1116 KB | Output is correct |
3 | Correct | 36 ms | 1116 KB | Output is correct |
4 | Correct | 33 ms | 1116 KB | Output is correct |
5 | Correct | 29 ms | 1116 KB | Output is correct |
6 | Correct | 36 ms | 1116 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 29 ms | 1116 KB | Output is correct |
2 | Correct | 33 ms | 1116 KB | Output is correct |
3 | Correct | 36 ms | 1116 KB | Output is correct |
4 | Correct | 33 ms | 1116 KB | Output is correct |
5 | Correct | 29 ms | 1116 KB | Output is correct |
6 | Correct | 36 ms | 1116 KB | Output is correct |
7 | Correct | 46 ms | 1116 KB | Output is correct |
8 | Correct | 56 ms | 1116 KB | Output is correct |
9 | Correct | 46 ms | 1116 KB | Output is correct |
10 | Correct | 43 ms | 1116 KB | Output is correct |
11 | Correct | 36 ms | 1116 KB | Output is correct |