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

Compile Error

primepie.cpp:5:9: error: conversion from ‘double’ to ‘long unsigned int’ in a converted constant expression
5 | bool pr[2e7];
| ^~~
primepie.cpp:5:9: error: could not convert ‘2.0e+7’ from ‘double’ to ‘long unsigned int’
primepie.cpp:5:9: error: size of array ‘pr’ has non-integral type ‘double’
primepie.cpp:6:7: error: expected constructor, destructor, or type conversion before ‘(’ token
6 | memset(pr, true, sizeof(pr));
| ^
primepie.cpp:7:1: error: ‘pr’ does not name a type
7 | pr[0] = false, pr[1] == false;
| ^~
primepie.cpp:8:1: error: expected unqualified-id before ‘for’
8 | for (int p=2; p*p<=100005; p++){
| ^~~
primepie.cpp:8:15: error: ‘p’ does not name a type; did you mean ‘pr’?
8 | for (int p=2; p*p<=100005; p++){
| ^
| pr
primepie.cpp:8:28: error: ‘p’ does not name a type; did you mean ‘pr’?
8 | for (int p=2; p*p&