7 lines
182 B
Haskell
7 lines
182 B
Haskell
|
divisors_3_5 [] acc = acc
|
||
|
divisors_3_5 (x:xs) acc
|
||
|
| rem x 3 == 0 || rem x 5 == 0 = divisors_3_5 xs (x:acc)
|
||
|
| otherwise = divisors_3_5 xs acc
|
||
|
|
||
|
e1 = sum (divisors_3_5 [1 .. 999] [])
|