spotlight-vm / examples /euler3.py
ctzamos's picture
Spotlight VM: the model and the programs from the post
e0c043c verified
Raw History Blame Contribute Delete
237 Bytes
# https://projecteuler.net/problem=3
# Find the largest prime factor of 600851475143.
def euler3(n=600851475143):
i = 2
while i * i <= n:
while n % i == 0:
n //= i
i += 1
return n
print(euler3())