标签:sqrt mat ber pre als += isp while code
i = 2
while i <= 200:
isPrimeNumber = True
j = 2
while j < i:
if(i % j == 0):
isPrimeNumber=False
break
j += 1
if(isPrimeNumber == True):
print("%d" % i)
i += 1
import math
i = 2
while i <= 200:
m = int(math.sqrt(i))
isPrimeNumber = True
j = 2
while j <= m:
if(i % j == 0):
isPrimeNumber=False
break
j += 1
if(isPrimeNumber == True):
print("%d" % i)
i += 1
标签:sqrt mat ber pre als += isp while code
原文地址:https://www.cnblogs.com/jie828/p/12455794.html