제출 #20521

#제출 시각아이디문제언어결과실행 시간메모리
20521SD (#35)채점 시스템 (OJUZ11_judge)C++14
31 / 100
46 ms1116 KiB
#include<cstdio> long long mat[11]; int lenll(long long pi) { int cnt = 0; while (pi > 0) { pi /= 10; cnt++; } return cnt; } int Go(long long pi, long long ti) { int cnt = 0; int len = lenll(pi); long long t = pi + mat[len]; while (t < ti) { cnt++; len++; t = pi + mat[len]; } return cnt; } int main() { mat[0] = 1; for (int i = 1; i < 11; i++) { mat[i] = mat[i - 1] * 10; } int N; scanf("%d", &N); for (int i = 0; i < N; i++) { long long pi, ti; scanf("%lld %lld", &pi,&ti); printf("%d\n", Go(pi, ti)); } }

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

judge.cpp: In function 'int main()':
judge.cpp:47:17: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d", &N);
                 ^
judge.cpp:51:30: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%lld %lld", &pi,&ti);
                              ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...