the-honk/euler/_pythonarchive/3 - Largest prime factor.py
2024-10-09 18:02:34 +01:00

10 lines
90 B
Python

n = 600851475143
i = 2
while i * i <= n:
if n % i:
i += 1
else:
n //= i
print(n)