Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- A palindromic number reads the same both ways. The largest
- -- palindrome made from the product of two 2-digit numbers is
- -- 9009 = 91 × 99. Find the largest palindrome made from the product
- -- of two 3-digit numbers.
- main :: IO ()
- main =
- print $
- maximum
- [ z
- | x <- [100 .. 999]
- , y <- [100 .. 999]
- , let z = x * y
- , show z == reverse (show z)
- ]
- -- 906609
- -- real 0m0,629s
- -- user 0m0,628s
- -- sys 0m0,000s
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement