Problem primepie
User bz
Submission Time 2024-06-11 21:14:56
Score 0
Max Time N/A
Max Memory N/A

Compile Error

primepie.cpp:7:7: error: expected constructor, destructor, or type conversion before ‘(’ token
7 | memset(pr, true, sizeof(pr));
| ^
primepie.cpp:8:1: error: ‘pr’ does not name a type
8 | pr[0] = false, pr[1] == false;
| ^~
primepie.cpp:9:1: error: expected unqualified-id before ‘for’
9 | for (int p=2; p*p<=maxn; p++){
| ^~~
primepie.cpp:9:15: error: ‘p’ does not name a type; did you mean ‘pr’?
9 | for (int p=2; p*p<=maxn; p++){
| ^
| pr
primepie.cpp:9:26: error: ‘p’ does not name a type; did you mean ‘pr’?
9 | for (int p=2; p*p<=maxn; p++){
| ^
| pr
primepie.cpp: In function ‘long long int amountEaten(int)’:
primepie.cpp:17:5: error: ‘ll’ was not declared in this scope
17 | ll ans = 0;
| ^~
primepie.cpp:20:13: error: ‘ans’ was not declared in this scope;