solve :: Int
solve = sum [フィボナッチ数列の400万より小さい偶数項]
-- フィボナッチ数列を作り、40000000より小さい偶数のみのリストの和を出せばいい
solve = sum [ n | n <- takeWhile (<4000000) fibs , even n]
fibs :: Integer
fibs = 1 : 2 : zipWith (+) fibs (tail fibs)
solve_p2 :: Integer
solve_p2 = sum [ n | n <- takeWhile (< 4000000) fibs, even n]
fibs :: [Integer]
fibs = 1 : 2 : zipWith (+) fibs (tail fibs)
print solve_p2