From 317ee36636ebeec986971ef857cd297f0320e58d Mon Sep 17 00:00:00 2001 From: Guillermo Ramos Date: Mon, 27 May 2013 10:31:48 +0200 Subject: start --- haskell/p20.hs | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 haskell/p20.hs (limited to 'haskell/p20.hs') diff --git a/haskell/p20.hs b/haskell/p20.hs new file mode 100644 index 0000000..d9468e8 --- /dev/null +++ b/haskell/p20.hs @@ -0,0 +1,6 @@ +import Data.Char (digitToInt) + +p20 :: Int +p20 = sum (map digitToInt (show (product [1..100]))) + +main = putStrLn $ "Solution: " ++ show p20 -- cgit v1.2.3