0_0_38630707_6097.cpp:6:15: error: 'MAXN' was not declared in this scope
int cnt,prime[MAXN],T,g,l,val;
^~~~
0_0_38630707_6097.cpp:6:15: note: suggested alternative: 'NAN'
int cnt,prime[MAXN],T,g,l,val;
^~~~
NAN
0_0_38630707_6097.cpp: In function 'void get_prime(long long int)':
0_0_38630707_6097.cpp:10:5: error: 'memset' was not declared in this scope
memset(is_prime,1,sizeof(is_prime));
^~~~~~
0_0_38630707_6097.cpp:10:5: note: 'memset' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
0_0_38630707_6097.cpp:4:1:
+#include <cstring>
using namespace std;
0_0_38630707_6097.cpp:10:5:
memset(is_prime,1,sizeof(is_prime));
^~~~~~
0_0_38630707_6097.cpp:14:30: error: 'prime' was not declared in this scope
if(is_prime[i] == 1) prime[++cnt] = i;
^~~~~
0_0_38630707_6097.cpp:14:30: note: suggested alternative: 'is_prime'
if(is_prime[i] == 1) prime[++cnt] = i;
^~~~~
is_prime
0_0_38630707_6097.cpp:15:39: error: 'prime' was not declared in this scope
for(int j = 1;j <= cnt && i * prime[j] <= n;j++)
^~~~~
0_0_38630707_6097.cpp:15:39: note: suggested alternative: 'is_prime'
for(int j = 1;j <= cnt && i * prime[j] <= n;j++)
^~~~~
is_prime
|