We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6f368a0 commit 397fb88Copy full SHA for 397fb88
SieveOfEratosthenes.py
@@ -3,7 +3,7 @@
3
numlist = range(2,x+1)
4
for num in numlist:
5
p = 2
6
- while p*num < numlist[-1]:
+ while p*num <= numlist[-1]:
7
if (p * num) in numlist:
8
numlist.remove(p * num)
9
p = p + 1
0 commit comments