codewars #29  Multiples of 3 or 5



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.


Finish the solution so that it returns the sum of all the multiples of 3 or 5 below the number passed in.


Note: If the number is a multiple of both 3 and 5, only count it once.


Courtesy of ProjectEuler.net



'매일매일개발 > Codewars' 카테고리의 다른 글

codewars #31 extract file name (6kyu)  (0) 2018.04.30
codewars #30 Psychic (3kyu)  (1) 2018.04.27
codewars #28 Valid Braces (4kyu)  (1) 2018.04.25
codewars #27 Follow that Spy (6kyu)  (0) 2018.04.24
오늘은 하루 쉼  (0) 2018.04.23

#24 A + B = 123



Task

Given number A you must return number B so that


(int) (A + B) == 123


Note

B can't be negative


:-)



+ Recent posts