Cody

Solution 1728498

Submitted on 16 Feb 2019 by Abdelfatah Teamah
  • Size: 7
  • 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
x = 1;y_correct = 1; assert(isequal(iccanobif(x),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 iccanobif (line 2) In ScoringEngineTestPoint1 (line 2) In solutionTest (line 3)]

2   Pass
x = 9;y_correct = 124; assert(isequal(iccanobif(x),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 iccanobif (line 2) In ScoringEngineTestPoint2 (line 2) In solutionTest (line 5)]

3   Pass
x = 43;y_correct=36181429034; assert(isequal(iccanobif(x),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 iccanobif (line 2) In ScoringEngineTestPoint3 (line 2) In solutionTest (line 7)]

4   Pass
for flag=1:50 y(flag)=iccanobif(flag); end dy=diff(y); assert(isequal(max(dy(1:25))+min(dy(1:25)),250750)) assert(isequal(max(dy)+min(dy),19910139546138)) sdy=sign(dy); assert(isequal(sum(sdy==-1),8)) [m1,w1]=min(y(1:10)); [m2,w2]=min(y(11:20)); [m3,w3]=min(y(21:30)); [m4,w4]=min(y(31:40)); [m5,w5]=min(y(41:50)); assert(isequal([m1 m2 m3 m4 m5],[1 836 113815 106496242 21807674140])) assert(isequal(w1*w2*w3*w4*w5,15))

[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 iccanobif (line 2) In ScoringEngineTestPoint4 (line 2) In solutionTest (line 9)] [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 iccanobif (line 2) In ScoringEngineTestPoint4 (line 2) In solutionTest (line 9)] [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 iccanobif (line 2) In ScoringEngineTestPoint4 (line 2) In solutionTest (line 9)] [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 iccanobif (line 2) In ScoringEngineTestPoint4 (line 2) In solutionTest (line 9)] [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 iccanobif (line 2) In ScoringEngineTestPoint4 (line 2) In solutionTest (line 9)] [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 iccanobif (line 2) In ScoringEngineTestPoint4 (line 2) In solutionTest (line 9)] [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 iccanobif (line 2) In ScoringEngineTestPoint4 (line 2) In solutionTest (line 9)] [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 iccanobif (line 2) In ScoringEngineTestPoint4 (line 2) In solutionTest (line 9)] [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 iccanobif (line 2) In ScoringEngineTestPoint4 (line 2) In solutionTest (line 9)] [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 iccanobif (line 2) In ScoringEngineTestPoint4 (line 2) In solutionTest (line 9)] [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 iccanobif (line 2) In ScoringEngineTestPoint4 (line 2) In solutionTest (line 9)] [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 iccanobif (line 2) In ScoringEngineTestPoint4 (line 2) In solutionTest (line 9)] [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 iccanobif (line 2) In ScoringEngineTestPoint4 (line 2) In solutionTest (line 9)] [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 iccanobif (line 2) In ScoringEngineTestPoint4 (line 2) In solutionTest (line 9)] [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 iccanobif (line 2) In ScoringEngineTestPoint4 (line 2) In solutionTest (line 9)] [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 iccanobif (line 2) In ScoringEngineTestPoint4 (line 2) In solutionTest (line 9)] [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 iccanobif (line 2) In ScoringEngineTestPoint4 (line 2) In solutionTest (line 9)] [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 iccanobif (line 2) In ScoringEngineTestPoint4 (line 2) In solutionTest (line 9)] [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 iccanobif (line 2) In ScoringEngineTestPoint4 (line 2) In solutionTest (line 9)] [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 iccanobif (line 2) In ScoringEngineTestPoint4 (line 2) In solutionTest (line 9)] [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 iccanobif (line 2) In ScoringEngineTestPoint4 (line 2) In solutionTest (line 9)] [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 iccanobif (line 2) In ScoringEngineTestPoint4 (line 2) In solutionTest (line 9)] [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 iccanobif (line 2) In ScoringEngineTestPoint4 (line 2) In solutionTest (line 9)] [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 iccanobif (line 2) In ScoringEngineTestPoint4 (line 2) In solutionTest (line 9)] [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 iccanobif (line 2) In ScoringEngineTestPoint4 (line 2) In solutionTest (line 9)] [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 iccanobif (line 2) In ScoringEngineTestPoint4 (line 2) In solutionTest (line 9)] [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 iccanobif (line 2) In ScoringEngineTestPoint4 (line 2) In solutionTest (line 9)] [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 iccanobif (line 2) In ScoringEngineTestPoint4 (line 2) In solutionTest (line 9)] [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 iccanobif (line 2) In ScoringEngineTestPoint4 (line 2) In solutionTest (line 9)] [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 iccanobif (line 2) In ScoringEngineTestPoint4 (line 2) In solutionTest (line 9)] [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 iccanobif (line 2) In ScoringEngineTestPoint4 (line 2) In solutionTest (line 9)] [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 iccanobif (line 2) In ScoringEngineTestPoint4 (line 2) In solutionTest (line 9)] [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 iccanobif (line 2) In ScoringEngineTestPoint4 (line 2) In solutionTest (line 9)] [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 iccanobif (line 2) In ScoringEngineTestPoint4 (line 2) In solutionTest (line 9)] [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 iccanobif (line 2) In ScoringEngineTestPoint4 (line 2) In solutionTest (line 9)] [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 iccanobif (line 2) In ScoringEngineTestPoint4 (line 2) In solutionTest (line 9)] [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 iccanobif (line 2) In ScoringEngineTestPoint4 (line 2) In solutionTest (line 9)] [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 iccanobif (line 2) In ScoringEngineTestPoint4 (line 2) In solutionTest (line 9)] [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 iccanobif (line 2) In ScoringEngineTestPoint4 (line 2) In solutionTest (line 9)] [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 iccanobif (line 2) In ScoringEngineTestPoint4 (line 2) In solutionTest (line 9)] [Warning: Function assert has the same n...

Suggested Problems