NTHPRIME - Nth Prime
There is no tedious description for this problem. You are just required to calculate and output the Nth prime number.
Input
The input consists of a single line containing an integer N, N ≤ 10^9.
Output
For each input file, output the Nth prime number.
Example
Input: 4 Output: 7
Note
The source limit is enabled to 4000B in order to restrict and discourage sending solutions with pre-computed tables.
hide comments
asutoshgha:
2020-09-13 09:04:30
any hints sieve is not working
|
|
nimphy:
2018-05-02 10:44:13
@[Lakshman] : 跪求your help! |
|
mzuenni:
2018-03-31 23:02:46
@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...)
|
|
Sushant Moon:
2017-10-05 11:00:21
@[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 |
|
[Lakshman]:
2017-07-09 16:49:21
@sgtlaugh I think my approach is correct, but getting WA. Can you Please see why I am getting WA.
|
|
ar7ab:
2015-09-05 12:19:32
my code is giving the perfect output in IdeOne but it's not getting accepted in here
|
|
raghulvirus:
2015-09-01 08:02:17
hi
|
|
Francky:
2015-08-25 18:45:46
Moved to tutorial ; this one don't give very new stuff to do.
|
Added by: | sgtlaugh |
Date: | 2015-08-25 |
Time limit: | 2.667s |
Source limit: | 4000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: GOSU |
Resource: | Own Problem |