summaryrefslogtreecommitdiff
path: root/haskell/p16.hs
diff options
context:
space:
mode:
authorGuillermo Ramos2013-05-27 10:31:48 +0200
committerGuillermo Ramos2013-05-27 10:31:48 +0200
commit317ee36636ebeec986971ef857cd297f0320e58d (patch)
tree88c10fdbf166beae22f6c9d6c79970ae2240f4b0 /haskell/p16.hs
downloadeuler-317ee36636ebeec986971ef857cd297f0320e58d.tar.gz
start
Diffstat (limited to 'haskell/p16.hs')
-rw-r--r--haskell/p16.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/haskell/p16.hs b/haskell/p16.hs
new file mode 100644
index 0000000..89de59f
--- /dev/null
+++ b/haskell/p16.hs
@@ -0,0 +1,6 @@
+import Data.Char (digitToInt)
+
+p16 :: Int
+p16 = sum (map digitToInt (show (2^1000)))
+
+main = putStrLn $ "Solution: " ++ show p16