diff options
Diffstat (limited to 'haskell/p6.hs')
-rw-r--r-- | haskell/p6.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/haskell/p6.hs b/haskell/p6.hs new file mode 100644 index 0000000..86f509d --- /dev/null +++ b/haskell/p6.hs @@ -0,0 +1,4 @@ +p6 :: Int +p6 = (sum [1..100])^2 - foldl (\a x -> x^2 + a) 0 [1..100] + +main = putStrLn $ "Solution: " ++ show p6 |