Compile Error

foo.cc:26:2: error: stray ‘#’ in program
   26 | }#include<bits/stdc++.h>
      |  ^
foo.cc:26:3: error: ‘include’ does not name a type
   26 | }#include<bits/stdc++.h>
      |   ^~~~~~~
foo.cc:28:5: error: redefinition of ‘int n’
   28 | int n,a[100001],ans;
      |     ^
foo.cc:3:5: note: ‘int n’ previously declared here
    3 | int n,a[100001],ans;
      |     ^
foo.cc:28:7: error: redefinition of ‘int a [100001]’
   28 | int n,a[100001],ans;
      |       ^
foo.cc:3:7: note: ‘int a [100001]’ previously declared here
    3 | int n,a[100001],ans;
      |       ^
foo.cc:28:17: error: redefinition of ‘int ans’
   28 | int n,a[100001],ans;
      |                 ^~~
foo.cc:3:17: note: ‘int ans’ previously declared here
    3 | int n,a[100001],ans;
      |                 ^~~
foo.cc:29:5: error: redefinition of ‘int sum(int)’
   29 | int sum(int n)
      |     ^~~
foo.cc:4:5: note: ‘int sum(int)’ previously defined here
    4 | int sum(int n)
      |     ^~~
foo.cc:39:5: error: redefinition of ‘int main()’
   39 | int main()
      |     ^~~~
foo.cc:14:5: note: ‘int main()’ previously defined here
   14 | int main()
      |     ^~~~

信息

递交者
类型
递交
题目
P2805 数位之和2级1 2024.9
语言
C++
递交时间
2025-07-22 11:06:20
评测时间
2025-07-22 11:08:10
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes