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 10 001st prime number?
# 求第10001个素数。
count = 0
i = 2
while True:
for j in range(2,int(i**0.5)+1):
if i % j == 0:
break
else:
count += 1
if count == 10001:
break
i += 1
print(i)
结果:104743