Why does this solution giving TLE?

problem:->https://online.codingblocks.com/app/player/245814/content/235581/4702/code-challenge

hi @yamangoyal100_ff74db54bdf01539 refer

thank you sir , please can you tell what was problem with my solution , why does it give TLE , so that i dont make this mistake further and i ll keep in my mind.

Don’t make sieve for each test case

But i didnt , i did used array instead of vector for once at starting and then i am just printing the number (input) …🥲

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.