All my solutions will be in Haskell! <3
#1
#2
#3 I don't like Prime numbers...
#4
#5
#6
#1
Code:
sum [x | x <- [3..999], (x `mod` 3==0)||(x `mod` 5==0)]
Code:
fib = 1 : 1 : zipWith (+) fib (tail fib)
sum [x | x <- takeWhile (<4*10^6) fib, x `mod` 2 == 0]
#4
Code:
isPalindrome n = ((head n) == (last n)) && isPalindrome (tail . init n)
max [x * y| x <- [1..999], [1..999], isPalindrome (x * y)]
Code:
foldl1 lcm [1..20]
Code:
(sum (map (^2) [1..100])) - (sum [1..100])^2