제출 #20659

#제출 시각아이디문제언어결과실행 시간메모리
20659errorist (#35)채점 시스템 (OJUZ11_judge)C++14
100 / 100
53 ms1116 KiB
#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;
}

컴파일 시 표준 에러 (stderr) 메시지

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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...