PrateekLovesCandy

It is showing run time error
https://ide.codingblocks.com/s/69196

make prime array global and increase its size upto 10^8 and also save ur answer memoize it
like if t=2 ans n=1000,999 then ur code is calciting them sepeartely
while calculating 1000 prime number u have already calculated 999 so try to save it it will futher optimize ur code
hope this help:) if any problem reply

Please Update my code.It will be very helpful

check this https://ide.codingblocks.com/s/69739

Hey Rishab,
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.