notZS = []
zs = []
for i in range(101,201):
for j in range(2,i):
if i%j == 0:
notZS.append(i)
break
if i not in notZS:
zs.append(i)
print(len(zs))
notZS = []
zs = []
for i in range(101,201):
for j in range(2,i):
if i%j == 0:
notZS.append(i)
break
if i not in notZS:
zs.append(i)
print(len(zs))
本文标题:统计101到200有多少个素数
本文链接:https://www.haomeiwen.com/subject/ccgurqtx.html
网友评论