[[ProjectEular]]

 -- Problem 4
 
 module Main (main) where
 
 main :: IO ()
 main = print $ problem4
 
 problem4 :: (Integral a) => a
 problem4 = maximum [ x * y | x <- [100..999], y <- [x..999], is_palindrome (x * y) ]
 
 is_palindrome :: (Integral a) => a -> Bool
 is_palindrome num = reverse (show num) == show num


トップ   差分 バックアップ リロード   一覧 単語検索 最終更新   ヘルプ   最終更新のRSS