Very similar to what I was trying to do, but in about a third of the size...
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))
|
9818 Solvers
Cell Counting: How Many Draws?
581 Solvers
347 Solvers
Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
297 Solvers
315 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!