Problem 9
http://projecteuler.net/index.php?section=problems&id=9
a + b + c = 1000 になるピタゴラス数 (a^2 + b^2 = c^2) を探して
a * b * c を求める。
main = (print . product . head ) touple where touple = [[a, b, 1000-a-b] | a <- [1..1000], b <- [1..(1000-a)], isPythagorean a b (1000-a-b)] isPythagorean:: (Integral a) => a -> a -> a -> Bool isPythagorean a b c | a <= b && b <= c = a ^ 2 + b ^ 2 == c ^ 2 | otherwise = False
a = 200
b = 375
c = 425