#!/usr/bin/env python
n = 100
i = 2
while i < n:
j = 2
while i/j >= j:
if i%j == 0:
break
j += 1
else:
print i
i += 1
python 求质数
最新推荐文章于 2024-08-11 22:14:39 发布
#!/usr/bin/env python
n = 100
i = 2
while i < n:
j = 2
while i/j >= j:
if i%j == 0:
break
j += 1
else:
print i
i += 1