답안 #20469

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
20469 2017-02-12T01:22:43 Z 후시기바나(#61, bupjae) 채점 시스템 (OJUZ11_judge) C++14
100 / 100
46 ms 1116 KB
#include <cstdio>

using namespace std;

int main2() {
	long long int p, t;
	scanf("%lld%lld", &p, &t);
	long long int q = 10;
	for (long long int p2 = p / 10; p2 > 0; p2 /= 10, q *= 10);
	for (int r = 0;; r++) {
		if (p + q > t) return r;
		q *= 10;
	}
}

int main() {
	int n;
	scanf("%d", &n);
	for (; n > 0; n--) printf("%d\n", main2());
	return 0;
}

Compilation message

judge.cpp: In function 'int main2()':
judge.cpp:7:27: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%lld%lld", &p, &t);
                           ^
judge.cpp: In function 'int main()':
judge.cpp:18:17: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d", &n);
                 ^
# 결과 실행 시간 메모리 Grader output
1 Correct 26 ms 1116 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 26 ms 1116 KB Output is correct
2 Correct 33 ms 1116 KB Output is correct
3 Correct 39 ms 1116 KB Output is correct
4 Correct 36 ms 1116 KB Output is correct
5 Correct 33 ms 1116 KB Output is correct
6 Correct 33 ms 1116 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 26 ms 1116 KB Output is correct
2 Correct 33 ms 1116 KB Output is correct
3 Correct 39 ms 1116 KB Output is correct
4 Correct 36 ms 1116 KB Output is correct
5 Correct 33 ms 1116 KB Output is correct
6 Correct 33 ms 1116 KB Output is correct
7 Correct 39 ms 1116 KB Output is correct
8 Correct 39 ms 1116 KB Output is correct
9 Correct 46 ms 1116 KB Output is correct
10 Correct 39 ms 1116 KB Output is correct
11 Correct 33 ms 1116 KB Output is correct