QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#742061#9738. Make It Divisibleucup-team5481#Compile Error//C++141.6kb2024-11-13 15:45:182024-11-13 15:45:27

Details

answer.code: In function ‘int main()’:
answer.code:47:2: error: expected ‘;’ before ‘scanf’
   47 | 2    scanf("%d", &T);
      |  ^   ~~~~~
      |  ;
answer.code:64:22: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘ll’ {aka ‘long long int’} [-Wformat=]
   64 |             printf("%d %lld\n", k, (k + 1) * k / 2);
      |                     ~^          ~
      |                      |          |
      |                      int        ll {aka long long int}
      |                     %lld
answer.code:55:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   55 |         scanf("%d%lld", &n, &k);
      |         ~~~~~^~~~~~~~~~~~~~~~~~
answer.code:58:18: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   58 |             scanf("%d", &b[i]);
      |             ~~~~~^~~~~~~~~~~~~