QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#470173#4928. Game With NumbersHuangHanShengCompile Error//C++98666b2024-07-10 11:04:522024-07-10 11:04:52

詳細信息

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]);
      |                 ~~~~~^~~~~~~~~~~~