제출 #20426

#제출 시각아이디문제언어결과실행 시간메모리
20426I_forgot_password (#35)채점 시스템 (OJUZ11_judge)C++98
100 / 100
39 ms2020 KiB
#include<bits/stdc++.h>
int main(){
    int n;
    scanf("%d",&n);
    for(int i=0;i<n;i++){
        long long m,l;
        scanf("%lld%lld",&m,&l);
        long long jari = 1;
        long long nn = m;
        while(nn>0){
            nn /= 10; jari *= 10;
        }
        if(m == 0) jari = 10;
        int ans = 0;
        long long gop = 1;
        for(;gop*jari+m<=l;ans+=1,gop*=10);
        printf("%d\n",ans);
    }
}

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

judge.cpp: In function 'int main()':
judge.cpp:4:19: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d",&n);
                   ^
judge.cpp:7:32: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("%lld%lld",&m,&l);
                                ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...