Cody

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

Solution 1991718

Submitted on 26 Oct 2019
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 s = 1×1 cell array {1×4 double} s = 1×2 cell array {1×4 double} {1×3 double} s = 1×3 cell array {1×4 double} {1×3 double} {1×2 double} a = 3 5 7 9 b = 8 12 16 c = 20 28 a = 3 5 7 9 b = 8 12 16 c = 20 28

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 s = 1×1 cell array {1×2 double} s = 1×2 cell array {1×2 double} {[32]} s = 1×3 cell array {1×2 double} {[32]} {1×0 double} a = 15 17 b = 32 c = 1×0 empty double row vector a = 15 17 b = 32 c = 1×0 empty double row vector

Assertion failed.