Skip to content

Instantly share code, notes, and snippets.

@2GMon
Created July 31, 2012 14:49
Show Gist options
  • Save 2GMon/3217556 to your computer and use it in GitHub Desktop.
Save 2GMon/3217556 to your computer and use it in GitHub Desktop.
abc = [[a, b, c] | c <- [1..], b <- [1..c], a <- [1..b], a^2 + b^2 == c^2, a + b + c == 1000]
main = putStrLn (show (product (head abc)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment