QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#470173#4928. Game With NumbersHuangHanShengCompile Error//C++98666b2024-07-10 11:04:522024-07-10 11:04:52

Details

answer.code: In function ‘int main()’:
answer.code:36:30: error: ‘s’ was not declared in this scope
   36 |         for(int i=1;i<=n;i++)s+=a[i];
      |                              ^
answer.code:11:35: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   11 |         for(int i=1;i<=n;i++)scanf("%d",&a[i]);
      |                              ~~~~~^~~~~~~~~~~~
answer.code:14:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   14 |                 scanf("%d",&b[i]);
      |                 ~~~~~^~~~~~~~~~~~