Cody

# Problem 44836. Iccanobif numbers 1

Solution 3433278

Submitted on 27 Oct 2020
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   Fail
x = 1;y_correct = 1; assert(isequal(iccanobif(x),y_correct))

out = 1

Output argument "y" (and maybe others) not assigned during call to "iccanobif". Error in Test1 (line 2) assert(isequal(iccanobif(x),y_correct))

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

out = 124

Output argument "y" (and maybe others) not assigned during call to "iccanobif". Error in Test2 (line 2) assert(isequal(iccanobif(x),y_correct))

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

out = 3.6181e+10

Output argument "y" (and maybe others) not assigned during call to "iccanobif". Error in Test3 (line 2) assert(isequal(iccanobif(x),y_correct))

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

out = 1

Output argument "y" (and maybe others) not assigned during call to "iccanobif". Error in Test4 (line 2) y(flag)=iccanobif(flag);

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!