Submission #20659

# Submission time Handle Problem Language Result Execution time Memory
20659 2017-02-13T10:49:38 Z errorist(#79, andy627) 채점 시스템 (OJUZ11_judge) C++14
100 / 100
53 ms 1116 KB
#include <stdio.h>

int main(){
    long long n,t,p;

    scanf("%lld",&n);
    while(n--){
        int cnt=0;
        long long m=1;

        scanf("%lld %lld",&p,&t);

        while(m<=p) m*=10;
        while(1){
            if(m+p<=t){
                cnt++;
                m*=10;
            }
            else break;
        }
        if(p==0){
            cnt--;
            if(m/10+t<=p) cnt--;
        }

        printf("%d\n",cnt);
    }

    return 0;
}

Compilation message

judge.cpp: In function 'int main()':
judge.cpp:6:21: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%lld",&n);
                     ^
judge.cpp:11:33: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("%lld %lld",&p,&t);
                                 ^
# 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 36 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 39 ms 1116 KB Output is correct
6 Correct 39 ms 1116 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 29 ms 1116 KB Output is correct
2 Correct 36 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 39 ms 1116 KB Output is correct
6 Correct 39 ms 1116 KB Output is correct
7 Correct 53 ms 1116 KB Output is correct
8 Correct 36 ms 1116 KB Output is correct
9 Correct 39 ms 1116 KB Output is correct
10 Correct 46 ms 1116 KB Output is correct
11 Correct 29 ms 1116 KB Output is correct