A prime number is a natural number which has exactly two distinct natural number divisors: 1 and itself.
The first prime number is 2. Can you write a program that computes the n-th prime number?
Since the answer may be large, you are only required to find the answer modulo 6.
n
A single integer representing the nth prime number modulo 6.
1
2
100000000000000
5
The 1014-th prime number is 3475385758524527. Don't forget to output the answer modulo 6!
Subtask | Score |
---|---|
1 | 100 |