Please help me correct my code

Why its not passing all the test cases cases

questin=deepak and primes
Deepak is learning Sieve of Eratosthenes, He is stuck somewhere. Help him printing prime numbers.

Input Format
Single line containing integral value n.

Constraints
1<=n<=500000

Output Format
Integral value denoting nth prime number.

Sample Input
1
Sample Output
2

Hi @Somasree
U can refer this code https://ide.codingblocks.com/s/586205

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.