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?
第一版
def is_prime(n):
if n < 2:return False
for i in range(2,int(math.sqrt(n))+1,1):
if not n % i:return False
return True
def run(n):
p = 1
i = 0
while i < n:
p += 1
if is_prime(p):
i += 1
return p