Skip to content

Commit 706c90c

Browse files
authored
O(n*lg(lg(n)))
1 parent 2afe045 commit 706c90c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

All_prime.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def all_primes(n):
99
if pr[x] == True:
1010
for i in range(x*x,n+1,x):
1111
pr[i] = False
12-
for i in range(len(pr)):
12+
for i in range(n+1): #changed range value from len(pr) to n+1, confirm if it works properly
1313
if pr[i] == True:
1414
print(i, end=" ")
1515

0 commit comments

Comments
 (0)