Prateek loves candy problem 2

https://ide.codingblocks.com/s/69738

i have used sieve of eratosthenes. still it is showing timelimit.

I’ve made some changes to your code…have a look here.

Hey Gaurav,
As you are not responding to this thread, I am marking your doubt as Resolved for now. Re-open it if required.

Please mark your doubts as resolved in your course’s “ Ask Doubt ” section, when your doubt is resolved.