Cody

Solution 1619533

Submitted on 30 Aug 2018 by Michael Jarboe
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
s = [ 195 125 260 440 395 290]; n=570; y_correct = [125 125 125 195]; assert(isequal(buy(s,n),y_correct))

m = [] y = [] n = 375 y = 195 n = 250 y = 195 125 n = 125 y = 195 125 125 n = 0 y = 195 125 125 125 y = 125 125 125 195

2   Pass
s = [ 150 180 60 40]; n=210; y_correct = [60 150]; assert(isequal(buy(s,n),y_correct))

m = [] y = [] n = 150 y = 60 n = 0 y = 60 150 y = 60 150