# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
20401 | 2017-02-11T02:00:23 Z | KEIST(#40, keist99) | 채점 시스템 (OJUZ11_judge) | C++ | 46 ms | 1116 KB |
#include<stdio.h> long long findjari(long long x, long long jari) { if (x==0) return jari; return findjari(x/10, jari+1); } int main() { long long query; scanf("%d", &query); while(query--) { long long correct, score; scanf("%lld %lld", &score, &correct); long long jari=findjari(score, 0); if (jari==0) jari++; long long defaultJari=1; for (long long i=1; i<=jari; i++) { defaultJari*=10; } long long cnt=0; while(1) { if ((score+defaultJari)>correct) { printf("%lld\n", cnt); break; } cnt++; defaultJari*=10; } } return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 29 ms | 1116 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 29 ms | 1116 KB | Output is correct |
2 | Correct | 36 ms | 1116 KB | Output is correct |
3 | Correct | 39 ms | 1116 KB | Output is correct |
4 | Correct | 36 ms | 1116 KB | Output is correct |
5 | Correct | 36 ms | 1116 KB | Output is correct |
6 | Correct | 33 ms | 1116 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 29 ms | 1116 KB | Output is correct |
2 | Correct | 36 ms | 1116 KB | Output is correct |
3 | Correct | 39 ms | 1116 KB | Output is correct |
4 | Correct | 36 ms | 1116 KB | Output is correct |
5 | Correct | 36 ms | 1116 KB | Output is correct |
6 | Correct | 33 ms | 1116 KB | Output is correct |
7 | Correct | 43 ms | 1116 KB | Output is correct |
8 | Correct | 43 ms | 1116 KB | Output is correct |
9 | Correct | 46 ms | 1116 KB | Output is correct |
10 | Correct | 36 ms | 1116 KB | Output is correct |
11 | Correct | 33 ms | 1116 KB | Output is correct |