Rozkład na czynniki pierwsze¶ Opis problemu¶ Implementacja¶ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16def distribute(n: int) -> list: prime_factors = [] i = 2 while n > 1: if n % i == 0: prime_factors.append(i) n /= i else: i += 1 return prime_factors n = 124 print(f"Prime factors of {n}: {distribute(n)}")