Harikrushna Vanpariya a4a699a1af Updated test for sum of multiplies #1253 | 6 jaren geleden | |
---|---|---|
.. | ||
.meta | 6 jaren geleden | |
src | 6 jaren geleden | |
README.md | 6 jaren geleden | |
build.gradle | 7 jaren geleden |
Given a number, find the sum of all the unique multiples of particular numbers up to but not including that number.
If we list all the natural numbers below 20 that are multiples of 3 or 5, we get 3, 5, 6, 9, 10, 12, 15, and 18.
The sum of these multiples is 78.
You can run all the tests for an exercise by entering
$ gradle test
in your terminal.
A variation on Problem 1 at Project Euler http://projecteuler.net/problem=1
It's possible to submit an incomplete solution so you can see how others have completed the exercise.