haskell: add p1, p2

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
2022-10-26 12:49:33 +05:30
parent fcce234a10
commit 6c89f18e9d
3 changed files with 15 additions and 0 deletions

5
haskell/p1.hs Normal file
View File

@@ -0,0 +1,5 @@
main :: IO ()
main = putStr $ show solve
solve :: Integer
solve = sum [ x | x <- [0..999], mod x 3 == 0 || mod x 5 == 0 ]