Prateek- loves candy problem

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

my code is showing no-output for test cases. how to rectify the error ?

Hi Yukti, i think your code will work till 10^4 . but in question it should be work till 10^6.

Try to use the method of seive of eratosthenes here.