It doesn't generate correct results but passed test suites. Why?
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
s = [ 195 125 260 440 395 290];
n=570;
y_correct = [125 125 125 195];
assert(isequal(buy(s,n),y_correct))
|
2 | Pass |
s = [ 150 180 60 40];
n=210;
y_correct = [60 150];
assert(isequal(buy(s,n),y_correct))
|
3074 Solvers
Swap the first and last columns
12408 Solvers
5703 Solvers
284 Solvers
The sum of the numbers in the vector
426 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!