TLE only for case 0 rest all are passing

https://ide.codingblocks.com/s/480115}

hello @pranaynigam

i think u have shared wrong link, pls check and share correct link

u need to optimise it furthur , for that store all the prime number upto 10^6 in some array or vector
and then use that vector to answer each query in O(1)
like this->

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.