Skip to content

Instantly share code, notes, and snippets.

@rhysd
Created July 26, 2012 04:46
Show Gist options
  • Save rhysd/3180300 to your computer and use it in GitHub Desktop.
Save rhysd/3180300 to your computer and use it in GitHub Desktop.
isPalindromeNum :: Int -> Bool
isPalindromeNum n = s == reverse s
where s = show n
main = putStrLn . show . maximum $ [x*y| x<-[100..999],y<-[x..999], isPalindromeNum $ x*y]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment