Submission #20575

# Submission time Handle Problem Language Result Execution time Memory
20575 2017-02-12T11:49:47 Z 김동현(#48, ring0297) 채점 시스템 (OJUZ11_judge) C++14
100 / 100
43 ms 2020 KB
#include <bits/stdc++.h>

using namespace std;

long long d, r, m, n;

int main()
{
    scanf("%lld", &n);
    for(int i=1;i<=n;i++){
        scanf("%lld %lld", &r, &m);
        d = 1;
        while(d<=r) d*=10;
        if(r==0) d = 10;
        for(int j=0;;j++,d*=10){
            if(d+r>m){
                printf("%d\n", j);
                break;
            }
        }
    }
    return 0;
}

Compilation message

judge.cpp: In function 'int main()':
judge.cpp:9:22: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%lld", &n);
                      ^
judge.cpp:11:35: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("%lld %lld", &r, &m);
                                   ^
# Verdict Execution time Memory Grader output
1 Correct 26 ms 2020 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 26 ms 2020 KB Output is correct
2 Correct 36 ms 2020 KB Output is correct
3 Correct 33 ms 2020 KB Output is correct
4 Correct 33 ms 2020 KB Output is correct
5 Correct 36 ms 2020 KB Output is correct
6 Correct 36 ms 2020 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 26 ms 2020 KB Output is correct
2 Correct 36 ms 2020 KB Output is correct
3 Correct 33 ms 2020 KB Output is correct
4 Correct 33 ms 2020 KB Output is correct
5 Correct 36 ms 2020 KB Output is correct
6 Correct 36 ms 2020 KB Output is correct
7 Correct 39 ms 2020 KB Output is correct
8 Correct 39 ms 2020 KB Output is correct
9 Correct 43 ms 2020 KB Output is correct
10 Correct 43 ms 2020 KB Output is correct
11 Correct 29 ms 2020 KB Output is correct