Skip to content

Commit 236cd42

Browse files
committed
Clarify the sum of multiples problem
It was unclear based on the description that a number should only be counted once, even if it was the multiple of more than one of the target factors.
1 parent 6a30ff8 commit 236cd42

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

sum-of-multiples.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
If we list all the natural numbers below 10 that are multiples of 3 or
2-
5, we get 3, 5, 6 and 9. The sum of these multiples is 23.
1+
If we list all the natural numbers below 15 that are multiples of either
2+
3 or 5, we get 3, 5, 6 and 9, 10, 12, and 15.
33

4-
Allow the program to be configured to find the sum of multiples of
5-
numbers other than 3 and 5.
4+
The sum of these multiples is 60.
5+
6+
Write a program that can find the sum of the multiples of a given set of
7+
numbers.

sum-of-multiples.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
---
2-
blurb: "Write a program that, given a number, can find the sum of all the multiples of 3 or 5 up to but not including that number."
2+
blurb: "Write a program that, given a number, can find the sum of all the multiples of particular numbers up to but not including that number."
33
source: "A variation on Problem 1 at Project Euler"
44
source_url: "http://projecteuler.net/problem=1"

0 commit comments

Comments
 (0)