foo.cc:4:1: error: expected initializer before '}' token
4 | }
| ^
foo.cc:4:1: error: expected declaration before '}' token
foo.cc:5:2: error: expected unqualified-id before 'if'
5 | if(n==1) return 0;
| ^~
foo.cc:6:2: error: expected unqualified-id before 'for'
6 | for(int i=2;i<=sqrt(n);i++)
| ^~~
foo.cc:6:14: error: 'i' does not name a type
6 | for(int i=2;i<=sqrt(n);i++)
| ^
foo.cc:6:25: error: 'i' does not name a type
6 | for(int i=2;i<=sqrt(n);i++)
| ^
foo.cc:13:3: error: expected unqualified-id before 'return'
13 | return 1;
| ^~~~~~
foo.cc:14:1: error: expected declaration before '}' token
14 | }
| ^
[Hydro](https://hydro.ac)提供评测服务