From eb183b1b6df517a01cc0ac0f89059f29c68f96e8 Mon Sep 17 00:00:00 2001 From: stud203999 Date: Fri, 8 May 2026 13:47:19 +0300 Subject: [PATCH] second_commit --- main.py | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 44159b3..22805d9 100644 --- a/main.py +++ b/main.py @@ -1 +1,23 @@ -print("Hello world") +def is_prime(n): + for i in range(2, n - 1): + if n % i == 0: + return False + return True + + +def prime_factors(n: int) -> list: + x = n + c = 2 + result = [] + while x > 1: + + if x % c == 0: + result.append(c) + x //= c + else: + c += 1 + + print(result) + + +prime_factors(1)