10001th prime: Difference between revisions
→{{header|Python}}
Line 528:
=={{header|Python}}==
<lang python>import time; max=10001; n=
while n<=max: # 1.5 5 seconds 10001 104743
f=0; j=2 # rextester.com/IYLSI54964
f=0▼
while f <
if
if p % j == 0:
s+=1▼
f=1
print(n-1,s-1)▼
if f != 1:
n+=1; #print(n,p)
print(time.perf_counter())</lang>
{{out}}
<pre>10001 104743 7 seconds</pre>
=={{header|QB64}}==
|