Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
project euler 1, haskel
--http://www.haskell.org/haskellwiki/Euler_problems/1_to_10#Problem_1 --If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. --Find the sum of all the multiples of 3 or 5 below 1000. import Data.List (union) problem_1' = sum (union [3,6..999] [5,10..999]) problem_1 = sum [x | x <- [1..999], x `mod` 3 == 0 || x `mod` 5 == 0] main = print $ problem_1
run
|
edit
|
history
|
help
1
perfect numbers
Hanoi solver
project euler 5, haskell
Producter
haskell
haskell linked list
Lowest Common Ancestor in a Binary Tree
Pi
Welcome
Reader