summaryrefslogtreecommitdiff
path: root/haskell/p20.hs
diff options
context:
space:
mode:
Diffstat (limited to 'haskell/p20.hs')
-rw-r--r--haskell/p20.hs6
1 files changed, 6 insertions, 0 deletions
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