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 c2223f5 commit bded104Copy full SHA for bded104
project_euler/problem_095/sol1.py
@@ -56,9 +56,9 @@ def generate_primes(num: int) -> list[int]:
56
"""
57
are_primes = [True] * (num + 1)
58
are_primes[0] = are_primes[1] = False
59
- for i in range(start=2, stop=isqrt(num) + 1):
+ for i in range(2, isqrt(num) + 1):
60
if are_primes[i]:
61
- for j in range(start=i * i, stop=num + 1, step=i):
+ for j in range(i * i, num + 1, i):
62
are_primes[j] = False
63
64
return [prime for prime, is_prime in enumerate(are_primes) if is_prime]
0 commit comments