fir type error (float != int) for apparently more strict python
This commit is contained in:
父節點
c6e7c0e1f3
當前提交
e58504c3f3
|
@ -17,7 +17,7 @@ if max < 1:
|
||||||
for cnt in range(3, max, 2) :
|
for cnt in range(3, max, 2) :
|
||||||
testMax = math.sqrt(cnt)+1
|
testMax = math.sqrt(cnt)+1
|
||||||
isPrime = 1
|
isPrime = 1
|
||||||
for test in range(3, testMax, 2):
|
for test in range(3, int(testMax), 2):
|
||||||
isPrime = cnt % test
|
isPrime = cnt % test
|
||||||
if isPrime == 0:
|
if isPrime == 0:
|
||||||
break
|
break
|
||||||
|
|
載入中…
新增問題並參考