NTHPRIME - Nth Prime
There is no tedious description for this problem. You are just required to calculate and output the Nth prime number.
The input consists of a single line containing an integer N, N10^9.
For each input file, output the Nth prime number.
Input: 4 Output: 7
The source limit is enabled to 4000B in order to restrict and discourage sending solutions with pre-computed tables.
@[Lakshman] : 跪求your help!
@sgtlaugh can you look at my solution and tell me where it is wrong? (either my binary search or pi implementation is wrong but i cant find a counter example...)
@[Lakshman] : can you give any hints on how you proceeded with this problem. Any general direction would be very much appreciated.Last edit: 2017-10-05 11:00:33
@sgtlaugh I think my approach is correct, but getting WA. Can you Please see why I am getting WA.
my code is giving the perfect output in IdeOne but it's not getting accepted in here
Moved to tutorial ; this one don't give very new stuff to do.