Spaces:
Runtime error
Runtime error
Download examples/euler3.py from percepta-ai/spotlight-vm: direct link, hf CLI and curl.
- Browser
- Download file 237 Bytes
-
https://huggingface.co/spaces/percepta-ai/spotlight-vm/resolve/main/examples/euler3.py
- Command line
-
hf download hf://spaces/percepta-ai/spotlight-vm/examples/euler3.py
-
curl -L -o euler3.py https://huggingface.co/spaces/percepta-ai/spotlight-vm/resolve/main/examples/euler3.py
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()) | |