def calc(N):
primeList = [2]
n = 1
i = 3
while(True):
for p in primeList:
if p * p > i: pass
elif i % p == 0: break
else:
primeList.append(i)
n += 1
print(n, i)
if n > N: break
i += 1
calc(10001)
0 件のコメント:
コメントを投稿