It is giving TLE for test case 5. Can you please tell what is wrong in my code. I have applied sieve of eratosthenes
Prateek Loves Candy Problem
increase array size 1000007
still u`ll encounter a tle in one case
have a look at the below code
1 Like
Now itβs working I created new array and stored all primes into it.Thank you so much for helping. 
1 Like