10001th prime: Difference between revisions

m
Line 532:
 
=={{header|Python}}==
<lang python>import time; max=10001; n=1; p=1; # PRIMES russian DANILIN
while n<=max: # 1.510001 104743 5 seconds 10001 104743
f=0; j=2 # rextester.com/IYLSI54964AHEH3087
while nf <= max1:
f=0;if j >=2 int(p**0.5):
while f < 1: f=2
if p if% j >== int(p**0.5):
f=21
if p % j +== 0:1
if f != f=1:
jn+=1;
if#print(n,p); f != 1:
np+=1; #print(n,p)2
print(n-1,p-12)
p+=1
print(n-1,p-1)
print(time.perf_counter())</lang>
{{out}}
51

edits