Deepak and primes,,,time limit exceded in last 2 test cases,doubt not yet cleared

https://ide.codingblocks.com/s/37288

https://hack.codingblocks.com/contests/c/512/700

1 case wrong
cant understand why

please answer this as well

kar raha hun yaar.
You have posted it just now. Let me read at least: :joy:

https://ide.codingblocks.com/s/37288 1

The link to the code that you have provided is not correct and complete.
You didn’t save it properly I think.

Please be careful while posting doubts here, and post proper links to question and code.

In this question, try to make a sieve of long long int and then make an array from numbers of that sieve
That is make array of prime numbers in which the prime number is stored on the index accordingly.
Then you’ll just have to print the prime number present on the index n, entered by the user.
Hope this helps. :grinning:

bhaiya
that is the correct link
i just checked .that is my code

did the same thing more efficiently by not creating an array and keeping a count of the prime n.o

sorry
its actually showing time limit excedded
please tell me how to increase its efficiency

someone please reply

Try to have patience for sometime after posting doubt here.

In the link you have posted
https://ide.codingblocks.com/s/37288
you are not using sieve… You can solve this ques efficiently using the sieve of Eratosthenes as mentioned in the ques itsellf.