Cody

Solution 1208412

Submitted on 8 Jun 2017 by Augusto Mazzei
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
a = [93 1147 473 259 629 1591 851 533 2021 86 817 2279 1763 961 1073 205] len_correct = 5; d_correct = 43; [len,d] = divisor_run(a); assert(isequal(len,len_correct) && isequal(d,d_correct))

a = Columns 1 through 14 93 1147 473 259 629 1591 851 533 2021 86 817 2279 1763 961 Columns 15 through 16 1073 205 F = 31 D = 31 M = 1 F = 1×0 empty double row vector F = 1×0 empty double row vector F = 1×0 empty double row vector F = 37 F = 37 D = 37 M = 2 F = 37 D = 37 M = 3 F = 1×0 empty double row vector F = 37 F = 37 F = 1×0 empty double row vector F = 37 F = 1×0 empty double row vector F = 1×0 empty double row vector F = 1×0 empty double row vector F = 43 F = 43 F = 43 F = 43 D = 43 M = 4 F = 1×0 empty double row vector F = 43 F = 43 F = 43 F = 1×0 empty double row vector F = 43 F = 43 F = 1×0 empty double row vector F = 43 F = 1×0 empty double row vector F = 1×0 empty double row vector F = 1×0 empty double row vector F = 1×0 empty double row vector len = 5 d = 43

2   Pass
a = [166 553 1241 869 237 395 1079 1577]; len_correct = 3; d_correct = 79; [len,d] = divisor_run(a); assert(isequal(len,len_correct) && isequal(d,d_correct))

F = 1×0 empty double row vector F = 1×0 empty double row vector F = 1×0 empty double row vector F = 79 D = 79 M = 1 F = 79 D = 79 M = 2 F = 1×0 empty double row vector F = 79 F = 1×0 empty double row vector F = 1×0 empty double row vector F = 83 len = 3 d = 79

3   Pass
a = [533 205 123 287 451 697 82]; len_correct = 7; d_correct = 41; [len,d] = divisor_run(a); assert(isequal(len,len_correct) && isequal(d,d_correct))

F = 41 D = 41 M = 1 F = 41 D = 41 M = 2 F = 41 D = 41 M = 3 F = 41 D = 41 M = 4 F = 41 D = 41 M = 5 F = 41 D = 41 M = 6 F = 41 F = 41 F = 41 F = 41 F = 41 F = 41 F = 41 F = 41 F = 41 F = 41 F = 41 F = 41 F = 41 F = 41 F = 41 len = 7 d = 41

4   Pass
a = [3937 7493 1397 5633 6439 3151 5617 685 7261 5069 ... 959 3973 411 2603 2329 1781 262]; len_correct = 12; d_correct = 137; [len,d] = divisor_run(a); assert(isequal(len,len_correct) && isequal(d,d_correct))

F = 127 D = 127 M = 1 F = 127 D = 127 M = 2 F = 1×0 empty double row vector F = 127 F = 1×0 empty double row vector F = 1×0 empty double row vector F = 1×0 empty double row vector F = 137 F = 137 F = 137 D = 137 M = 3 F = 137 D = 137 M = 4 F = 137 D = 137 M = 5 F = 137 D = 137 M = 6 F = 137 D = 137 M = 7 F = 137 D = 137 M = 8 F = 137 D = 137 M = 9 F = 137 D = 137 M = 10 F = 137 D = 137 M = 11 F = 1×0 empty double row vector F = 137 F = 137 F = 137 F = 137 F = 137 F = 137 F = 137 F = 137 F = 137 F = 137 F = 1×0 empty double row vector F = 137 F = 137 F = 137 F = 137 F = 137 F = 137 F = 137 F = 137 F = 137 F = 1×0 empty double row vector F = 137 F = 137 F = 137 F = 137 F = 137 F = 137 F = 137 F = 137 F = 1×0 empty double row vector F = 137 F = 137 F = 137 F = 137 F = 137 F = 137 F = 137 F = 1×0 empty double row vector F = 137 F = 137 F = 137 F = 137 F = 137 F = 137 F = 1×0 empty double row vector F = 137 F = 137 F = 137 F = 137 F = 137 F = 1×0 empty double row vector F = 137 F = 137 F = 137 F = 137 F = 1×0 empty double row vector F = 137 F = 137 F = 137 F = 1×0 empty double row vector F = 137 F = 137 F = 1×0 empty double row vector F = 137 F = 1×0 empty double row vector F = 1×0 empty double row vector len = 12 d = 137