10001th prime: Difference between revisions
m
→{{header|Python}}
Line 532:
=={{header|Python}}==
<lang python>import time; max=10001; n=1; p=1; #
while n<=max: #
f=0; j=2; s = int(p**0.5) # rextester.com/
while f < 1:
if j >=
f=2
if p % j == 0:
Line 543:
if f != 1:
n+=1;
#print(n,p);
p+=
print(n-1,p-
print(time.perf_counter())</lang>
{{out}}
|