euler/Problem001.hs

3 lines
134 B
Haskell

-- Find the sum of all the multiples of 3 or 5 below 1000.
main = print $ sum [ n | n <- [1..999], n `mod` 3 == 0 || n `mod` 5 == 0 ]