Cody

Solution 1797490

Submitted on 25 Apr 2019 by goc3
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))

2   Pass
x = 9;y_correct = 124; assert(isequal(iccanobif(x),y_correct))

y = 124

3   Pass
x = 43;y_correct=36181429034; assert(isequal(iccanobif(x),y_correct))

y = 3.6181e+10

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))

y = 39 y = 124 y = 514 y = 836 y = 1053 y = 4139 y = 12815 y = 61135 y = 104937 y = 792517 y = 1454698 y = 9679838 y = 17354310 y = 9735140 y = 1760750 y = 986050 y = 621360 y = 113815 y = 581437 y = 1252496 y = 7676706 y = 13019288 y = 94367798 y = 178067380 y = 173537220 y = 106496242 y = 265429972 y = 522619163 y = 641840787 y = 1.1490e+09 y = 2.5217e+09 y = 9.2912e+09 y = 1.1226e+10 y = 2.1808e+10 y = 2.2286e+10 y = 3.6181e+10 y = 7.5126e+10 y = 1.0146e+11 y = 8.1453e+10 y = 1.0835e+11 y = 1.0012e+12 y = 1.0046e+13 y = 2.9976e+13

More from this Author80