Sign in $ create-account
~/problems ~/discussion ~/contests ~/submission
← ~/problems
P2015

The N-th Prime

Medium
// Description
Output the k-th prime number (the 1st prime is 2).
// Input
A single integer k (1 <= k <= 1000).
// Output
The k-th prime number.
// Hint
Sieve once, then index into the list of primes.
// Samples
Sample Input
5
Sample Output
11
// Problem Info
DifficultyMedium
Acceptance70%
Time Limit1000 ms
Memory Limit65536 KB
Accepted7
Number Theory
// Discussion

No Discussion