Sum Groups Then Multiply
EasyP3Coding
Return (a + b + c) * (d + e + f + g).
Example 1
- Input
- a = 1, b = 2, c = 3, d = 4, e = 5, f = 6, g = 7
- Output
- 132
Example 2
- Input
- a = 0, b = 0, c = 0, d = 1, e = 1, f = 1, g = 1
- Output
- 0
Example 3
- Input
- a = 1, b = 1, c = 1, d = 0, e = 0, f = 0, g = 0
- Output
- 0
Constraints
- -1000 <= each value <= 1000
Hints
Give it a real attempt first. Run shows which examples fail.
Saved automatically
Run checks the 3 visible tests, Submit all 8. ⌘Enter runs, ⌘⇧Enter submits.