标签:lock import 练习 编程 port form ret isp prime
我写的:
import time
def isPrime(n):
for i in range (2,int(n**0.5)):
if n % i == 0:
return False
else:
return True
t=time.clock()
strPrimes=" "
for j in range (2,10000000000):
if isPrime(j):
strPrimes=strPrimes+str(j)+" "
print(strPrimes)
print("Time used:{}".format(time.clock()))
肯定大佬有更快的解决办法,编程小白求指教。
标签:lock import 练习 编程 port form ret isp prime
原文地址:http://www.cnblogs.com/X-reborn/p/6747164.html