@ -1,5 +1,14 @@
def prime_factors(n: int) -> list:
factors = []
d = 2
while d * d <= n:
while n % d == 0:
factors.append(d)
n //= d
d += 1 if d == 2 else 2
if n > 1:
factors.append(n)
return factors
print(prime_factors(12))
print(prime_factors(77))
The note is not visible to the blocked user.