why I am getting TLE error
Prateek bhaiya loves candy problem
make 2 changes
-
make size of array 7400000
this is because The 500,000th prime is 7,368,787. -
make seive only once for that call is_prime fucntion outside the loop
Modified Code
1 Like