#t494. 第 n 小的质数
第 n 小的质数
The n-th Smallest Prime
Problem Description
Given a positive integer , find the -th smallest prime number.
Input Format
One positive integer not exceeding .
Output Format
The -th smallest prime number.
Sample Input
10
Sample Output
29
Constraints
.
Hint
- The primes in order are ; the -th is .
- Generate primes (a simple primality test up to a few hundred thousand is fast enough) and stop at the -th one.