Can't able to find out what is wrong with this code

can’t able to find out what is wrong with this code,applied prime sieve.

hey @shubhamkumarsingh
u are getting tle because maximum value of t can be 10000

and for each test case u r running loop for 1000000 times due to which overall number of operations are 10000 X 1000000 which is greater than 10^8 .

to remove tle just store each prime numbers in an array or vector (say pr) and print pr[n-1] when u r asked to print nth prime

made a new array and assigned prime numbers in it ,I am not getting tle , none of the test cases are showing correct

test cases are not showing correct

@shubhamkumarsingh
refer to this