euler/lisp/euler003.lisp

8 lines
181 B
Common Lisp
Raw Normal View History

2016-10-19 21:34:59 +00:00
(load "euler.lisp")
(defun prime-factors (n)
(select (lambda (a) (eq (mod n a) 0)) (eratosthenes (sqrt n)))
)
(defun solution () (first (reverse (prime-factors 600851475143))))