Cody

Solution 1715314

Submitted on 25 Jan 2019 by Valentin Noël-Youïnou
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
v=[10^8 10^7 10^6 10^5 10^4 10^3 100 10 1]; pcoef='103050709'; mcoef='010203040'; sum = 92847669; assert(isequal(linear_vec_sum(v, pcoef, mcoef),sum))

[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 linear_vec_sum (line 2) In ScoringEngineTestPoint1 (line 5) In solutionTest (line 3)]

2   Pass
v=[5 2 8]; pcoef='840'; mcoef='006'; sum = 0; assert(isequal(linear_vec_sum(v, pcoef, mcoef),sum))

[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 linear_vec_sum (line 2) In ScoringEngineTestPoint2 (line 5) In solutionTest (line 5)]

3   Pass
v=[12 6 16]; pcoef='110'; mcoef='001'; sum = 2; assert(isequal(linear_vec_sum(v, pcoef, mcoef),sum))

[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 linear_vec_sum (line 2) In ScoringEngineTestPoint3 (line 5) In solutionTest (line 7)]