Problem
https://projecteuler.net/problem=7
By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13,
we can see that the 6th prime is 13.
What is the 10001st prime number?
Answer: 104743
Solution
euler007.cpp
See Also
# |
cpp |
go |
java |
php |
ruby |
rust |
javascript |
1 |
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
3 |
|
|
|
|
|
|
|
4 |
|
|
|
|
|
|
|
5 |
|
|
|
|
|
|
|
6 |
|
|
|
|
|
|
|
7 |
|
|
|
|
|
|
|
8 |
|
|
|
|
|
|
|
9 |
|
|
|
|
|
|
|
10 |
|
|
|
|
|
|
|
11 |
|
|
|
|
|
|
|
12 |
|
|
|
|
|
|
|
# |
cpp |
ruby |
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
|
|
23 |
|
|
24 |
|
|