Problem 230. Project Euler: Problem 1, Multiples of 3 and 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.
Find the sum of all the multiples of 3 or 5 below the input value.
Thank you to Project Euler Problem 1
Solution Stats
Problem Comments
-
4 Comments
Show
1 older comment
Aaron
on 11 Sep 2016
Very well thought problem. Took me a few minutes to see why the "simplest" solution was incorrect. Well posed problem.
Owen
on 11 Jul 2022
Cool Problem!
Hrishikesh Patil
on 19 Feb 2025
nicee
Solution Comments
Show commentsProblem Recent Solvers3394
Suggested Problems
-
Find the sum of all the numbers of the input vector
50783 Solvers
-
2304 Solvers
-
Sum all integers from 1 to 2^n
16078 Solvers
-
Number of 1s in a binary string
9797 Solvers
-
748 Solvers
More from this Author51
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!