Cody

# Problem 2902. What's for Lunch?

Solution 1691882

Submitted on 13 Dec 2018 by HH
• Size: 9
• This is the leading solution.
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
b = 18; e = 7; s = 9; d = 24; y_correct = 217728; assert(isequal(lunch(b,e,s,d),y_correct))

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

2   Pass
b = 2; d = 3; s = 10; e = 4; y_correct = 2160; assert(isequal(lunch(b,e,s,d),y_correct))

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

3   Pass
b = 1; d = 2; s = 11; e = 3; y_correct = 660; assert(isequal(lunch(b,e,s,d),y_correct))

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

4   Pass
b = 5; d = 2; s = 9; e = 100; y_correct = 72000; assert(isequal(lunch(b,e,s,d),y_correct))

[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 lunch (line 2) In ScoringEngineTestPoint4 (line 6) In solutionTest (line 9)]