Fix: Ensure all skills are tracked as files, not submodules

This commit is contained in:
sck_0
2026-01-14 18:48:48 +01:00
parent 7f46ed8ca1
commit 8bd204708b
1113 changed files with 82065 additions and 2 deletions

View File

@@ -0,0 +1,22 @@
def largest_prime_factor(n: int):
"""Return the largest prime factor of n. Assume n > 1 and is not a prime.
>>> largest_prime_factor(13195)
29
>>> largest_prime_factor(2048)
2
"""
largest = 2
while n % 2 == 0:
n //= 2
factor = 3
while factor * factor <= n:
while n % factor == 0:
largest = factor
n //= factor
factor += 2
if n > 1:
largest = n
return largest