Cody

Solution 1305657

Submitted on 20 Oct 2017 by Eric G.
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
[g f t] = filltime(0.25, 0.1, 2); assert(isequal([g f t],[3 3 10]))

nglasses = 1 3

2   Pass
[g f t] = filltime(0.45, 0.3, 6); assert(isequal([g f t],[21 15 69]))

nglasses = 1 3 6 10 15 21

3   Pass
[g f t] = filltime(3, 0.8, 7); assert(isequal([g f t],[28 18 240]))

nglasses = 1 3 6 10 15 21 28

4   Pass
[g f t] = filltime(2, 8, 47); assert(isequal([g f t],[1128 138 811]))

nglasses = Columns 1 through 15 1 3 6 10 15 21 28 36 45 55 66 78 91 105 120 Columns 16 through 30 136 153 171 190 210 231 253 276 300 325 351 378 406 435 465 Columns 31 through 45 496 528 561 595 630 666 703 741 780 820 861 903 946 990 1035 Columns 46 through 47 1081 1128