Deepak and primes problem

my test case 0 and 1 always give tle…
i try all possible solution…
make a sieve and then track to get nth prime

paste the link on ide.codingblocks.com and comment the link so i can see the comment and help you accordingly

Your seive was wrong.

where plz mention or give some hint plz

but 4 cases passes only 2 stuck if sieve is wrong then all cases are wrong??