제출 #20469

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

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

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