TLE in one case

Ques ) https://hack.codingblocks.com/app/practice/1/67/problem

My ans ) https://ide.codingblocks.com/s/247201

hello @N4i9kita
store all prime numbers in some array or vector and then use that array/vector to print nth prime in O(1)

1 Like

hello @aman212yadav .
I want to ask something . What do u think , if I get a doubt or a problem in the output while test cases run should I ask it at that moment or rather take some time ( like an hr or so ) think over it and then ask ?

if u stuck at any problem then first try to solve it on ur own. if it takes too much time then u can ask.

Ok . Thanks . :grin: