Cody

Solution 453435

Submitted on 11 Jun 2014 by Abdullah Caliskan
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 8 93 1147 473 259 629 1591 851 533 Columns 9 through 16 2021 86 817 2279 1763 961 1073 205 ff = Columns 1 through 6 [1x2 double] [1x2 double] [1x2 double] [1x2 double] [1x2 double] [1x2 double] Columns 7 through 12 [1x2 double] [1x2 double] [1x2 double] [1x2 double] [1x2 double] [1x2 double] Columns 13 through 16 [1x2 double] [1x2 double] [1x2 double] [1x2 double] h = [] s1 = 3 31 s2 = 31 37 s1 = 31 37 s2 = 11 43 s1 = 11 43 s2 = 7 37 s1 = 7 37 s2 = 17 37 s1 = 17 37 s2 = 37 43 s1 = 37 43 s2 = 23 37 s1 = 23 37 s2 = 13 41 s1 = 13 41 s2 = 43 47 s1 = 43 47 s2 = 2 43 s1 = 2 43 s2 = 19 43 s1 = 19 43 s2 = 43 53 s1 = 43 53 s2 = 41 43 s1 = 41 43 s2 = 31 31 s1 = 31 31 s2 = 29 37 s1 = 29 37 s2 = 5 41 f = 31 37 43 b = [] r = 1 r = 3 r = 4 gg = 4 43 3 37 1 31 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))

ff = Columns 1 through 6 [1x2 double] [1x2 double] [1x2 double] [1x2 double] [1x2 double] [1x2 double] Columns 7 through 8 [1x2 double] [1x2 double] h = [] s1 = 2 83 s2 = 7 79 s1 = 7 79 s2 = 17 73 s1 = 17 73 s2 = 11 79 s1 = 11 79 s2 = 3 79 s1 = 3 79 s2 = 5 79 s1 = 5 79 s2 = 13 83 s1 = 13 83 s2 = 19 83 f = 79 83 b = [] r = 2 r = 1 gg = 2 79 1 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))

ff = Columns 1 through 6 [1x2 double] [1x2 double] [1x2 double] [1x2 double] [1x2 double] [1x2 double] Column 7 [1x2 double] h = [] s1 = 13 41 s2 = 5 41 s1 = 5 41 s2 = 3 41 s1 = 3 41 s2 = 7 41 s1 = 7 41 s2 = 11 41 s1 = 11 41 s2 = 17 41 s1 = 17 41 s2 = 2 41 f = 41 b = [] r = 6 gg = 6 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))

ff = Columns 1 through 6 [1x2 double] [1x2 double] [1x2 double] [1x2 double] [1x2 double] [1x2 double] Columns 7 through 12 [1x2 double] [1x2 double] [1x2 double] [1x2 double] [1x2 double] [1x2 double] Columns 13 through 17 [1x2 double] [1x2 double] [1x2 double] [1x2 double] [1x2 double] h = [] s1 = 31 127 s2 = 59 127 s1 = 59 127 s2 = 11 127 s1 = 11 127 s2 = 43 131 s1 = 43 131 s2 = 47 137 s1 = 47 137 s2 = 23 137 s1 = 23 137 s2 = 41 137 s1 = 41 137 s2 = 5 137 s1 = 5 137 s2 = 53 137 s1 = 53 137 s2 = 37 137 s1 = 37 137 s2 = 7 137 s1 = 7 137 s2 = 29 137 s1 = 29 137 s2 = 3 137 s1 = 3 137 s2 = 19 137 s1 = 19 137 s2 = 17 137 s1 = 17 137 s2 = 13 137 s1 = 13 137 s2 = 2 131 f = 127 137 b = [] r = 2 r = 11 gg = 11 137 2 127 len = 12 d = 137