https://www.colorless-sight.jp:443/wiki/?ProjectEular%2FProblem4
-- 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 |
最新の20件2023-08-12
2022-12-28
2017-08-15
2014-01-31
2014-01-29
2013-06-04
2012-11-23
2010-08-01
2010-07-24
Tweet
|