Cody

# Problem 43615. pizza deals

Solution 1702208

Submitted on 4 Jan 2019 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
alpha1 = 30; alpha2 = 40; r1 = 20; r2 = 15; p1 = 1.5; p2 = 1.4; p = pizza_comp(alpha1, r1, p1, alpha2, r2, p2); p_correct = 1; assert(isequal(p, p_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 pizza_comp (line 2) In ScoringEngineTestPoint1 (line 7) In solutionTest (line 3)]

2   Pass
alpha1 = 30; alpha2 = 40; r1 = 20; r2 = 17; p1 = 1.5; p2 = 1.3; p = pizza_comp(alpha1, r1, p1, alpha2, r2, p2); p_correct = 2; assert(isequal(p, p_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 pizza_comp (line 2) In ScoringEngineTestPoint2 (line 7) In solutionTest (line 5)]

3   Pass
alpha1 = 28; alpha2 = 40; r1 = 20; r2 = 16; p1 = 1.28-3.1250e-04; p2 = 1.17; p = pizza_comp(alpha1, r1, p1, alpha2, r2, p2); p_correct = 0; assert(isequal(p, p_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 pizza_comp (line 2) In ScoringEngineTestPoint3 (line 7) In solutionTest (line 7)]