Cody

# Problem 44456. Sum of combinations

Solution 1669257

Submitted on 8 Nov 2018 by Oleksandr Denysenko
• Size: 13
• This is the leading solution.
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   Pass
x = 40; y = [40 20 10 4]; z_correct = [1 0 0 0; 0 2 0 0; 0 1 2 0; 0 1 1 3; 0 1 0 5; 0 0 4 0; 0 0 3 3; 0 0 2 5; 0 0 1 8; 0 0 0 10]; assert(isequal(your_fcn_name(x,y),z_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In your_fcn_name (line 4) In ScoringEngineTestPoint1 (line 4) In solutionTest (line 3)]

2   Pass
x = 13; y = [40 20 10 4]; z_correct = [1 0 0 0; 0 1 0 0; 0 0 2 0; 0 0 1 1; 0 0 0 4]; assert(isequal(your_fcn_name(x,y),z_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In your_fcn_name (line 4) In ScoringEngineTestPoint2 (line 4) In solutionTest (line 5)]

3   Pass
x = 19; y = [10 4]; z_correct = [2 0; 1 3; 0 5]; assert(isequal(your_fcn_name(x,y),z_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In your_fcn_name (line 4) In ScoringEngineTestPoint3 (line 4) In solutionTest (line 7)]