Skip to content

Instantly share code, notes, and snippets.

@ziotom78
Created September 28, 2011 09:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ziotom78/1247484 to your computer and use it in GitHub Desktop.
Save ziotom78/1247484 to your computer and use it in GitHub Desktop.
Solution of Project Euler's Problem 34 (Haskell)
import Data.Char (digitToInt)
main = print (sum ([x | x <- [10..100000], x == sum (map (\n -> product [1..n]) (map (digitToInt) (show x)))]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment