We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3821524 commit 6fa052cCopy full SHA for 6fa052c
Python/count-the-number-of-ideal-arrays.py
@@ -37,7 +37,7 @@ def linear_sieve_of_eratosthenes(n): # Time: O(n), Space: O(n)
37
def prime_factors(x):
38
factors = collections.Counter()
39
for p in primes:
40
- if x < p:
+ if p*p > x:
41
break
42
while x%p == 0:
43
factors[p] += 1
0 commit comments