Problem prime
User theodorelee
Submission Time 2025-01-10 09:50:21
Score 0
Max Time N/A
Max Memory N/A

Compile Error

prime.cpp: In function ‘int main()’:
prime.cpp:25:107: error: invalid operands of types ‘void*’ and ‘int’ to binary ‘operator%’
25 | if ((current*6+1)%2==0 || (current*6+1)%3==0 || (current*6+1)%5==0 || (current*6+1)%7==0) && n%(current*6+1)==0){
| ~~~~^~~~~~~~~~~~~~
| | |
| void* int
prime.cpp:25:106: error: label ‘n’ used but not defined
25 | if ((current*6+1)%2==0 || (current*6+1)%3==0 || (current*6+1)%5==0 || (current*6+1)%7==0) && n%(current*6+1)==0){
| ^