Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

5 lines (4 sloc) 0.19 kB
triplesOfSum :: Int -> [[Int]]
triplesOfSum n = [[n-z-y,y,z] | z <- [1..quot n 2], y <- [z, z-1..1], (n - z - y)^2 + y^2 == z^2 ]
euler9 :: Int -> Int
euler9 = product . head . triplesOfSum
Jump to Line
Something went wrong with that request. Please try again.