답안 #20478

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
20478 2017-02-12T02:46:00 Z 볼빨간민돌이(#63, mindol) 채점 시스템 (OJUZ11_judge) C++11
100 / 100
46 ms 1116 KB
#include <cstdio>

int main(){
	int n;
	scanf("%d", &n);
	for(int i=1; i<=n; i++){
		long long p, t;
        scanf("%lld %lld", &p, &t);

        long long in=10;
        while(in <= p) in*=10;

        int cnt=0;
        while(p+in<=t) cnt++, in*=10;
        printf("%d\n", cnt);
	}
	return 0;
}

Compilation message

judge.cpp: In function 'int main()':
judge.cpp:5:17: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d", &n);
                 ^
judge.cpp:8:35: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("%lld %lld", &p, &t);
                                   ^
# 결과 실행 시간 메모리 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 33 ms 1116 KB Output is correct
4 Correct 29 ms 1116 KB Output is correct
5 Correct 29 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 33 ms 1116 KB Output is correct
4 Correct 29 ms 1116 KB Output is correct
5 Correct 29 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 33 ms 1116 KB Output is correct
9 Correct 46 ms 1116 KB Output is correct
10 Correct 43 ms 1116 KB Output is correct
11 Correct 29 ms 1116 KB Output is correct