Cody

# Problem 43100. Add Me To Death (Sum sum sum)

Solution 2135722

Submitted on 21 Feb 2020
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Fail
x = [1 2 3 4 5]; sum_input = 15; sum_output = 24; vec_sum_adjacent = [3 5 7 9] [a b c] = addMeToDeath(x) assert(isequal(a,sum_input)) assert(isequal(b,sum_output)) assert(isequal(c,vec_sum_adjacent))

vec_sum_adjacent = 3 5 7 9 a = 15 b = 35 c = 1 3 6 10 15 a = 15 b = 35 c = 1 3 6 10 15

Assertion failed.

2   Fail
x = [7 8 9]; sum_input = 24; sum_output = 32; vec_sum_adjacent = [15 17] [a b c] = addMeToDeath(x) assert(isequal(a,sum_input)) assert(isequal(b,sum_output)) assert(isequal(c,vec_sum_adjacent))

vec_sum_adjacent = 15 17 a = 24 b = 46 c = 7 15 24 a = 24 b = 46 c = 7 15 24

Assertion failed.

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!