diff options
Diffstat (limited to 'haskell/p1.hs')
-rw-r--r-- | haskell/p1.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/haskell/p1.hs b/haskell/p1.hs new file mode 100644 index 0000000..3241a79 --- /dev/null +++ b/haskell/p1.hs @@ -0,0 +1,4 @@ +p1 :: Int +p1 = sum [x | x <- [1..999], mod x 3 == 0 || mod x 5 == 0] + +main = putStrLn $ "Solution: " ++ show p1 |