답안 #20532

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
20532 2017-02-12T08:02:56 Z CodingAmolang(#71, sys7961) 채점 시스템 (OJUZ11_judge) C++11
100 / 100
53 ms 1116 KB
#include<stdio.h>

int main() {
	int tc;
	scanf("%d", &tc);
	while (tc--) {
		long long a, b;
		scanf("%lld%lld", &a, &b);
		long long p = 10;
		int cnt = 0;
		while (p + a <= b) {
			if (a / p == 0) {
				cnt++;
			}
			p *= 10;
		}
		printf("%d\n", cnt);
	}
}

Compilation message

judge.cpp: In function 'int main()':
judge.cpp:5:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d", &tc);
                  ^
judge.cpp:8:28: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%lld%lld", &a, &b);
                            ^
# 결과 실행 시간 메모리 Grader output
1 Correct 29 ms 1116 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 29 ms 1116 KB Output is correct
2 Correct 39 ms 1116 KB Output is correct
3 Correct 43 ms 1116 KB Output is correct
4 Correct 39 ms 1116 KB Output is correct
5 Correct 39 ms 1116 KB Output is correct
6 Correct 39 ms 1116 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 29 ms 1116 KB Output is correct
2 Correct 39 ms 1116 KB Output is correct
3 Correct 43 ms 1116 KB Output is correct
4 Correct 39 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 46 ms 1116 KB Output is correct
8 Correct 46 ms 1116 KB Output is correct
9 Correct 49 ms 1116 KB Output is correct
10 Correct 43 ms 1116 KB Output is correct
11 Correct 53 ms 1116 KB Output is correct