Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Project Euler - Problem 5
import Data.List(sort)
result = head
$ filter
(\x -> isDivisible x [12,14,15,16,18,20])
candidates
where candidates = [primeProds, primeProds * 2..]
primeProds = 2 * 3 * 5 * 7 * 11 * 13 * 17 * 19
isDivisible n divisors = and
$ map
(\d -> n `mod` d == 0)
divisors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.