Skip to content

Sum of multiple issue #360

Closed
Closed
@LukeSkyw

Description

@LukeSkyw

The sum of multiples exercise says:

Given a number, find the sum of the multiples of a given set of numbers, up to but not including that number.

One of the test is:

#[test]
fn multiples_seven() {
    assert_eq!(30, sum_of_multiples(15, &vec![4, 6]))
}

However:

4 x 1 =>  4
6 x 1 =>  6
4 x 2 =>  8
6 x 2 => 12
4 x 3 => 12
        ---
         42

But the test says 30, like it's ignoring 4 x 3 (the second 12).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions