Cody

Solution 1648751

Submitted on 15 Oct 2018 by Martin C.
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 15 93 1147 473 259 629 1591 851 533 2021 86 817 2279 1763 961 1073 Column 16 205 bs = 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 bs = 0 1 2 1 2 1 2 2 2 2 1 2 2 1 2 1 bs = 1 3 1 3 1 3 3 1 1 2 1 3 3 1 1 1 bs = 3 2 3 4 4 1 1 3 1 1 2 4 3 1 3 0 bs = 3 1 5 1 5 1 5 5 5 2 1 5 5 1 5 1 bs = 2 6 4 0 6 2 4 1 5 2 5 4 6 2 2 2 bs = 5 3 1 3 5 7 3 5 5 6 1 7 3 1 1 5 bs = 3 4 5 7 8 7 5 2 5 5 7 2 8 7 2 7 bs = 3 7 3 9 9 1 1 3 1 6 7 9 3 1 3 5 bs = 5 3 0 6 2 7 4 5 8 9 3 2 3 4 6 7 bs = 9 7 5 7 5 7 11 5 5 2 1 11 11 1 5 1 bs = 2 3 5 12 5 5 6 0 6 8 11 4 8 12 7 10 bs = 9 13 11 7 13 9 11 1 5 2 5 11 13 9 9 9 bs = 3 7 8 4 14 1 11 8 11 11 7 14 8 1 8 10 bs = 13 11 9 3 5 7 3 5 5 6 1 7 3 1 1 13 bs = 8 8 14 4 0 10 1 6 15 1 1 1 12 9 2 1 bs = 3 13 5 7 17 7 5 11 5 14 7 11 17 7 11 7 bs = 17 7 17 12 2 14 15 1 7 10 0 18 15 11 9 15 bs = 13 7 13 19 9 11 11 13 1 6 17 19 3 1 13 5 bs = 9 13 11 7 20 16 11 8 5 2 19 11 20 16 2 16 bs = 5 3 11 17 13 7 15 5 19 20 3 13 3 15 17 7 bs = 1 20 13 6 8 4 0 4 20 17 12 2 15 18 15 21 bs = 21 19 17 19 5 7 11 5 5 14 1 23 11 1 17 13 bs = 18 22 23 9 4 16 1 8 21 11 17 4 13 11 23 5 bs = 15 3 5 25 5 5 19 13 19 8 11 17 21 25 7 23 bs = 12 13 14 16 8 25 14 20 23 5 7 11 8 16 20 16 bs = 9 27 25 7 13 23 11 1 5 2 5 11 27 9 9 9 bs = 6 16 9 27 20 25 10 11 20 28 5 17 23 4 0 2 bs = 3 7 23 19 29 1 11 23 11 26 7 29 23 1 23 25 bs = 0 0 8 11 9 10 14 6 6 24 11 16 27 0 19 19 bs = 29 27 25 3 21 23 19 21 5 22 17 7 3 1 17 13 bs = 27 25 11 28 2 7 26 5 8 20 25 2 14 4 17 7 bs = 25 25 31 21 17 27 1 23 15 18 1 1 29 9 19 1 bs = 23 27 18 14 34 16 11 8 26 16 12 4 13 16 23 30 bs = 21 31 5 7 17 7 23 29 5 14 25 11 35 25 29 25 bs = 19 0 29 0 0 0 0 15 23 12 3 22 24 36 0 20 bs = 17 7 17 31 21 33 15 1 7 10 19 37 15 11 9 15 bs = 15 16 5 25 5 31 32 26 32 8 37 17 8 25 20 10 bs = 13 27 33 19 29 31 11 13 21 6 17 39 3 1 33 5 bs = 11 40 22 13 14 33 31 0 12 4 38 24 0 18 7 0 bs = 9 13 11 7 41 37 11 29 5 2 19 11 41 37 23 37 bs = 7 29 0 1 27 0 34 17 0 0 0 0 0 15 41 33 bs = 5 3 33 39 13 7 15 5 41 42 25 35 3 37 17 29 bs = 3 22 23 34 44 16 41 38 41 41 7 29 8 16 38 25 bs = 1 43 13 29 31 27 23 27 43 40 35 25 15 41 15 21 bs = 46 19 3 24 18 40 5 16 0 39 18 23 24 21 39 17 bs = 45 43 41 19 5 7 35 5 5 38 1 23 35 1 17 13 bs = 44 20 32 14 41 23 18 43 12 37 33 25 48 30 44 9 bs = 43 47 23 9 29 41 1 33 21 36 17 29 13 11 23 5 bs = 42 25 14 4 17 10 35 23 32 35 1 35 29 43 2 1 bs = 41 3 5 51 5 31 19 13 45 34 37 43 47 25 33 49 bs = 40 34 49 47 46 1 3 3 7 33 22 0 14 7 13 46 bs = 39 13 41 43 35 25 41 47 23 32 7 11 35 43 47 43 bs = 38 47 33 39 24 51 26 38 41 31 47 24 3 26 28 40 bs = 37 27 25 35 13 23 11 29 5 30 33 39 27 9 9 37 bs = 36 7 17 31 2 52 53 20 26 29 19 56 53 49 47 34 bs = 35 45 9 27 49 25 39 11 49 28 5 17 23 33 29 31 bs = 34 26 1 23 39 57 25 2 15 27 50 37 52 17 11 28 bs = 33 7 53 19 29 31 11 53 41 26 37 59 23 1 53 25 bs = 32 49 46 15 19 5 58 45 8 25 24 22 55 46 36 22 bs = 31 31 39 11 9 41 45 37 37 24 11 47 27 31 19 19 bs = 30 13 32 7 62 16 32 29 5 23 61 11 62 16 2 16 bs = 29 59 25 3 53 55 19 21 37 22 49 39 35 1 49 13 bs = 28 42 18 64 44 31 6 13 6 21 37 4 8 51 33 10 bs = 27 25 11 61 35 7 59 5 41 20 25 35 47 37 17 7 bs = 26 8 4 58 26 50 47 64 11 19 13 1 21 23 1 4 bs = 25 59 65 55 17 27 35 57 49 18 1 35 63 9 53 1 bs = 24 43 59 52 8 4 23 50 20 17 58 2 38 64 38 67 bs = 23 27 53 49 69 51 11 43 61 16 47 39 13 51 23 65 bs = 22 11 47 46 61 29 70 36 33 15 36 7 59 38 8 63 bs = 21 67 41 43 53 7 59 29 5 14 25 47 35 25 65 61 bs = 20 52 35 40 45 58 48 22 50 13 14 16 11 12 51 59 bs = 19 37 29 37 37 37 37 15 23 12 3 59 61 73 37 57 bs = 18 22 23 34 29 16 26 8 71 11 67 29 38 61 23 55 bs = 17 7 17 31 21 71 15 1 45 10 57 75 15 49 9 53 bs = 16 69 11 28 13 51 4 71 19 9 47 46 69 37 72 51 bs = 15 55 5 25 5 31 71 65 71 8 37 17 47 25 59 49 bs = 14 41 78 22 76 11 61 59 46 7 27 67 25 13 46 47 bs = 13 27 73 19 69 71 51 53 21 6 17 39 3 1 33 45 bs = 12 13 68 16 62 52 41 47 77 5 7 11 62 70 20 43 bs = 11 81 63 13 55 33 31 41 53 4 79 65 41 59 7 41 bs = 10 68 58 10 48 14 21 35 29 3 70 38 20 48 77 39 bs = 9 55 53 7 41 79 11 29 5 2 61 11 83 37 65 37 bs = 8 42 48 4 34 61 1 23 66 1 52 69 63 26 53 35 bs = 7 29 43 1 27 43 77 17 43 0 43 43 43 15 41 33 bs = 6 16 38 85 20 25 68 11 20 86 34 17 23 4 29 31 bs = 5 3 33 83 13 7 59 5 85 86 25 79 3 81 17 29 bs = 4 79 28 81 6 78 50 88 63 86 16 54 72 71 5 27 bs = 3 67 23 79 89 61 41 83 41 86 7 29 53 61 83 25 bs = 2 55 18 77 83 44 32 78 19 86 89 4 34 51 72 23 bs = 1 43 13 75 77 27 23 73 89 86 81 71 15 41 61 21 bs = 0 31 8 73 71 10 14 68 68 86 73 47 89 31 50 19 bs = 93 19 3 71 65 87 5 63 47 86 65 23 71 21 39 1...

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

bs = 0 1 1 1 1 1 1 1 bs = 1 1 2 2 0 2 2 2 bs = 2 1 1 1 1 3 3 1 bs = 1 3 1 4 2 0 4 2 bs = 4 1 5 5 3 5 5 5 bs = 5 0 2 1 6 3 1 2 bs = 6 1 1 5 5 3 7 1 bs = 4 4 8 5 3 8 8 2 bs = 6 3 1 9 7 5 9 7 bs = 1 3 9 0 6 10 1 4 bs = 10 1 5 5 9 11 11 5 bs = 10 7 6 11 3 5 0 4 bs = 12 7 9 1 13 3 1 9 bs = 1 13 11 14 12 5 14 2 bs = 6 9 9 5 13 11 7 9 bs = 13 9 0 2 16 4 8 13 bs = 4 13 17 5 3 17 17 11 bs = 14 2 6 14 9 15 15 0 bs = 6 13 1 9 17 15 19 17 bs = 19 7 2 8 6 17 8 2 bs = 12 3 9 11 17 21 1 15 bs = 5 1 22 18 7 4 21 13 bs = 22 1 17 5 21 11 23 17 bs = 16 3 16 19 12 20 4 2 bs = 10 7 19 11 3 5 13 17 bs = 4 13 26 5 21 17 26 11 bs = 26 21 9 1 13 3 15 9 bs = 21 2 23 28 5 18 6 11 bs = 16 13 11 29 27 5 29 17 bs = 11 26 1 1 20 23 25 27 bs = 6 9 25 5 13 11 23 9 bs = 1 25 20 11 6 32 23 26 bs = 30 9 17 19 33 21 25 13 bs = 26 28 16 29 27 10 29 2 bs = 22 13 17 5 21 35 35 29 bs = 18 35 20 18 15 25 6 23 bs = 14 21 25 33 9 15 15 19 bs = 10 7 32 11 3 5 26 17 bs = 6 33 1 29 37 35 39 17 bs = 2 20 11 8 32 26 13 19 bs = 40 7 23 29 27 17 29 23 bs = 37 37 37 9 22 8 4 29 bs = 34 25 9 33 17 43 23 37 bs = 31 13 26 14 12 35 44 2 bs = 28 1 45 41 7 27 21 13 bs = 25 36 19 23 2 19 45 26 bs = 22 25 41 5 45 11 23 41 bs = 19 14 16 36 41 3 1 9 bs = 16 3 41 19 37 45 29 27 bs = 13 43 17 2 33 38 8 47 bs = 10 33 45 37 29 31 39 17 bs = 7 23 22 21 25 24 19 40 bs = 4 13 53 5 21 17 53 11 bs = 1 3 31 44 17 10 34 37 bs = 54 49 9 29 13 3 15 9 bs = 52 40 44 14 9 53 53 38 bs = 50 31 23 57 5 47 35 11 bs = 48 22 2 43 1 41 17 43 bs = 46 13 41 29 57 35 59 17 bs = 44 4 21 15 54 29 42 52 bs = 42 57 1 1 51 23 25 27 bs = 40 49 44 50 48 17 8 2 bs = 38 41 25 37 45 11 55 41 bs = 36 33 6 24 42 5 39 17 bs = 34 25 53 11 39 65 23 59 bs = 32 17 35 65 36 60 7 36 bs = 30 9 17 53 33 55 59 13 bs = 28 1 68 41 30 50 44 59 bs = 26 63 51 29 27 45 29 37 bs = 24 56 34 17 24 40 14 15 bs = 22 49 17 5 21 35 71 65 bs = 20 42 0 66 18 30 57 44 bs = 18 35 57 55 15 25 43 23 bs = 16 28 41 44 12 20 29 2 bs = 14 21 25 33 9 15 15 57 bs = 12 14 9 22 6 10 1 37 bs = 10 7 71 11 3 5 65 17 bs = 8 0 56 0 0 0 52 76 bs = 6 73 41 69 77 75 39 57 bs = 4 67 26 59 75 71 26 38 bs = 2 61 11 49 73 67 13 19 bs = 0 55 79 39 71 63 0 0 bs = 82 49 65 29 69 59 71 65 bs = 81 43 51 19 67 55 59 47 bs = 80 37 37 9 65 51 47 29 bs = 79 31 23 86 63 47 35 11 bs = 78 25 9 77 61 43 23 81 bs = 77 19 84 68 59 39 11 64 bs = 76 13 71 59 57 35 89 47 bs = 75 7 58 50 55 31 78 30 bs = 74 1 45 41 53 27 67 13 bs = 73 88 32 32 51 23 56 89 bs = 72 83 19 23 49 19 45 73 bs = 71 78 6 14 47 15 34 57 bs = 70 73 89 5 45 11 23 41 bs = 69 68 77 93 43 7 12 25 bs = 68 63 65 85 41 3 1 9 bs = 67 58 53 77 39 98 89 92 bs = 66 53 41 69 37 95 79 77 bs = 65 48 29 61 35 92 69 62 bs = 64 43 17 53 33 89 59 47 bs = 63 38 5 45 31 86 49 32 bs = 62 33 97 37 29 83 39 17 bs = 61 28 86 29 27 80 29 2 bs = 60 23 75 21 25 77 19 93 bs = 59 18 64 13 23 74 9 79 bs = 58 13 53 5 21 71 107 65 bs = 57 8 42 106 19 68 98 51 bs = 56 3 31 99 17 65 89 37 bs = 55 109 20 92 15 62 80 23 bs = 54 105 9 85 13 59 71 9 bs = 53 101 111 78 11 56 62 108 bs = 52 97 101 71 9 53 53 95 bs = 51 93 91 64 7 50 44 82 bs = 50 89 81 57 5 47 35 69 bs = 49 85 71 50 3 44 26 56 bs = 48 81 61 43 1 41 17 43 bs = 47 77 51 36 118 38 8 30 bs = 46 73 41 29 117 35 119 17 bs = 45 69 31 22 116 32 111 4 bs = 44 65 21 15 115 29 103 113 bs = 43 61 11 8 114 26 95 101 bs = 42 57 1 1 113 23 87 89 bs = 41 53 116 119 112 20 79 77 bs = 40 49 107 113 111 17 71 65 bs = 39 45 98 107 110 14 63 53 bs = 38 41 89 101 109 11 55 41 bs = 37 37 80 95 108 8 47 29 bs = 36 33 71 89 107 5 39 17 bs = 35 29 62 83 106 2 31 5 bs = 34 25 53 77 105 131 23 125 bs = 33 21 44 71 104 129 15 114 bs = 32 17 35 65 103 127 7 103 bs = 31 13 26 59 102 125 134 92 bs = 30 9 17 53 101 123 127 81 bs = 29 5 8 47 100 121 120 70 bs = 28 1 137 41 99 119 113 59 bs = 27 136 129 35 98 117 106 48 bs = 26 133 121 29 97 115 99 37 bs = 25 130 113 23 96 113 92 26 bs = 24 127 105 17 95 111 85 15 bs = 23 124 97 11 94 109 78 4 bs = 22 121 89 5 93 107 71 137 bs = 21 118 81 144 92 105 64 127 bs = 20 115 73 139 91 103 57 117 bs = 19 112 65 134 90 101 50 107 bs = 18 109 57 129 89 99 43 97 bs = 17 106 49 124 88 97 36 87 bs = 16 103 41 119 87 95 29 77 bs = 15 100 33 114 86 93 22 67 bs = 14 97 25 109 85 91 15 57 bs = 13 94 17 104 84 89 8 47 bs = 12 91 9 99 83 87 1 37 bs = 11 88 1 94 82 85 149 27 bs = 10 85 149 89 81 83 143 17 bs = 9 82 142 84 80 81 137 7 bs = 8 79 135 79 79 79 131 155 bs = 7 76 128 74 78 77 125 146 bs = 6 73 121 69 77 75 119 137 bs = 5 70 114 64 76 73 113 128 bs = 4 67 107 59 75 71 107 119 bs = 3 64 100 54 74 69 101 110 bs = 2 61 93 49 73 67 95 101 bs = 1 58 86 44 72 65 89 92 bs = 0 55 79 39 71 63 83 83 bs = 166 52 72 34 70 61 77 74 bs = 166 49 65 29 69 59 71 65 bs = 166 46 58 24 68 57 65 56 bs = 166 43 51 19 67 55 59 47 bs = 166 40 44 14 66 53 53 38 bs = 166 37 37 9 65 51 47 29 bs = 166 34 30 4 64 49 41 20 bs = 166 31 23 173 63 47 35 11 bs = 166 28 16 169 62 45 29 2 bs = 166 25 9 165 61 43 23 169 bs = 166 22 2 ...

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

bs = 1 1 1 1 1 1 0 bs = 2 1 0 2 1 1 1 bs = 1 1 3 3 3 1 2 bs = 3 0 3 2 1 2 2 bs = 5 1 3 5 1 1 4 bs = 1 2 4 0 3 4 5 bs = 5 5 3 7 3 1 2 bs = 2 7 6 8 1 4 1 bs = 3 5 3 7 1 7 2 bs = 5 7 2 1 0 4 5 bs = 5 1 3 11 7 1 10 bs = 0 10 6 1 9 8 4 bs = 1 9 11 7 3 11 12 bs = 8 10 3 2 1 7 7 bs = 5 13 11 15 3 9 2 bs = 6 1 4 15 9 0 14 bs = 11 7 15 17 1 13 10 bs = 1 15 9 2 14 13 6 bs = 13 5 3 7 11 17 2 bs = 8 16 18 14 10 4 19 bs = 5 7 13 1 11 15 16 bs = 4 21 8 11 14 7 13 bs = 5 13 3 23 19 1 10 bs = 8 5 23 12 1 22 7 bs = 13 23 19 1 9 21 4 bs = 20 16 15 17 19 22 1 bs = 1 9 11 7 3 25 26 bs = 11 2 7 26 16 1 24 bs = 23 25 3 17 1 7 22 bs = 6 19 30 8 17 15 20 bs = 21 13 27 31 3 25 18 bs = 5 7 24 23 22 4 16 bs = 23 1 21 15 9 17 14 bs = 8 30 18 7 31 32 12 bs = 29 25 15 35 19 13 10 bs = 15 20 12 28 7 31 8 bs = 1 15 9 21 33 13 6 bs = 26 10 6 14 22 34 4 bs = 13 5 3 7 11 17 2 bs = 0 0 0 0 0 0 0 bs = 29 37 39 35 31 25 40 bs = 17 33 37 29 21 9 39 bs = 5 29 35 23 11 37 38 bs = 38 25 33 17 1 22 37 bs = 27 21 31 11 37 7 36 bs = 16 17 29 5 28 39 35 bs = 5 13 27 47 19 25 34 bs = 43 9 25 42 10 11 33 bs = 33 5 23 37 1 47 32 bs = 23 1 21 32 43 34 31 bs = 13 49 19 27 35 21 30 bs = 3 46 17 22 27 8 29 bs = 47 43 15 17 19 49 28 bs = 38 40 13 12 11 37 27 bs = 29 37 11 7 3 25 26 bs = 20 34 9 2 52 13 25 bs = 11 31 7 55 45 1 24 bs = 2 28 5 51 38 48 23 bs = 53 25 3 47 31 37 22 bs = 45 22 1 43 24 26 21 bs = 37 19 61 39 17 15 20 bs = 29 16 60 35 10 4 19 bs = 21 13 59 31 3 57 18 bs = 13 10 58 27 61 47 17 bs = 5 7 57 23 55 37 16 bs = 64 4 56 19 49 27 15 bs = 57 1 55 15 43 17 14 bs = 50 67 54 11 37 7 13 bs = 43 65 53 7 31 67 12 bs = 36 63 52 3 25 58 11 bs = 29 61 51 71 19 49 10 bs = 22 59 50 68 13 40 9 bs = 15 57 49 65 7 31 8 bs = 8 55 48 62 1 22 7 bs = 1 53 47 59 71 13 6 bs = 71 51 46 56 66 4 5 bs = 65 49 45 53 61 73 4 bs = 59 47 44 50 56 65 3 bs = 53 45 43 47 51 57 2 bs = 47 43 42 44 46 49 1 bs = 41 41 41 41 41 41 0 bs = 35 39 40 38 36 33 82 bs = 29 37 39 35 31 25 82 bs = 23 35 38 32 26 17 82 bs = 17 33 37 29 21 9 82 bs = 11 31 36 26 16 1 82 bs = 5 29 35 23 11 81 82 bs = 88 27 34 20 6 74 82 bs = 83 25 33 17 1 67 82 bs = 78 23 32 14 87 60 82 bs = 73 21 31 11 83 53 82 bs = 68 19 30 8 79 46 82 bs = 63 17 29 5 75 39 82 bs = 58 15 28 2 71 32 82 bs = 53 13 27 95 67 25 82 bs = 48 11 26 93 63 18 82 bs = 43 9 25 91 59 11 82 bs = 38 7 24 89 55 4 82 bs = 33 5 23 87 51 97 82 bs = 28 3 22 85 47 91 82 bs = 23 1 21 83 43 85 82 bs = 18 102 20 81 39 79 82 bs = 13 101 19 79 35 73 82 bs = 8 100 18 77 31 67 82 bs = 3 99 17 75 27 61 82 bs = 105 98 16 73 23 55 82 bs = 101 97 15 71 19 49 82 bs = 97 96 14 69 15 43 82 bs = 93 95 13 67 11 37 82 bs = 89 94 12 65 7 31 82 bs = 85 93 11 63 3 25 82 bs = 81 92 10 61 112 19 82 bs = 77 91 9 59 109 13 82 bs = 73 90 8 57 106 7 82 bs = 69 89 7 55 103 1 82 bs = 65 88 6 53 100 112 82 bs = 61 87 5 51 97 107 82 bs = 57 86 4 49 94 102 82 bs = 53 85 3 47 91 97 82 bs = 49 84 2 45 88 92 82 bs = 45 83 1 43 85 87 82 bs = 41 82 0 41 82 82 82 bs = 37 81 123 39 79 77 82 bs = 33 80 123 37 76 72 82 bs = 29 79 123 35 73 67 82 bs = 25 78 123 33 70 62 82 bs = 21 77 123 31 67 57 82 bs = 17 76 123 29 64 52 82 bs = 13 75 123 27 61 47 82 bs = 9 74 123 25 58 42 82 bs = 5 73 123 23 55 37 82 bs = 1 72 123 21 52 32 82 bs = 131 71 123 19 49 27 82 bs = 128 70 123 17 46 22 82 bs = 125 69 123 15 43 17 82 bs = 122 68 123 13 40 12 82 bs = 119 67 123 11 37 7 82 bs = 116 66 123 9 34 2 82 bs = 113 65 123 7 31 137 82 bs = 110 64 123 5 28 133 82 bs = 107 63 123 3 25 129 82 bs = 104 62 123 1 22 125 82 bs = 101 61 123 143 19 121 82 bs = 98 60 123 142 16 117 82 bs = 95 59 123 141 13 113 82 bs = 92 58 123 140 10 109 82 bs = 89 57 123 139 7 105 82 bs = 86 56 123 138 4 101 82 bs = 83 55 123 137 1 97 82 bs = 80 54 123 136 149 93 82 bs = 77 53 123 135 147 89 82 bs = 74 52 123 134 145 85 82 bs = 71 51 123 133 143 81 82 bs = 68 50 123 132 141 77 82 bs = 65 49 123 131 139 73 82 bs = 62 48 123 130 137 69 82 bs = 59 47 123 129 135 65 82 bs = 56 46 123 128 133 61 82 bs = 53 45 123 127 131 57 82 bs = 50 44 123 126 129 53 82 bs = 47 43 123 125 127 49 82 bs = 44 42 123 124 125 45 82 bs = 41 41 123 123 123 41 82 bs = 38 40 123 122 121 37 82 bs = 35 39 123 121 119 33 82 bs = 32 38 123 120 117 29 82 bs = 29 37 123 119 115 25 82 bs = 26 36 123 118 113 21 82 bs = 23 35 123 117 111 17 82 bs = 20 34 123 116 109 13 82 bs = 17 33 123 115 107 9 82 bs = 14 32 123 114 105 5 82 bs = 11 31 123 113 103 1 82 bs = 8 30 123 112 101 172 82 bs = 5 29 123 111 99 169 82 bs = 2 28 123 110 97 166 82 bs = 177 27 123 109 95 163 82 bs = 175 26 123 108 93 160 82 bs = 173 25 123 107 91 157 82 bs = 171 24 123 106 89 154 82 bs = 169 23 123 105 87 151 82 bs = 167 22 123 104 85 148 82 bs = 165 21 123 103 83 145 82 bs = 163 20 123 102 81 142 82 bs = 161 19 123 101 79 139 82 bs = 159 18 123 100 77 136 82 bs = 157 17 123 99 75 133 82 bs = 155 16 123 98 73 130 82 bs = 153 15 123 97 71 127 82 bs = 151 14 123 96 69 124 82 bs = 149 13 123 95 67 121 82 bs = 147 12 123 94 65 118 82 bs = 145 11 123 93 63 115 82 bs = 143 10 123 92 61 112 82 bs = 141 9 123 91 59 109 82 bs = 139 8 123 90 57 106 82 bs =...

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

bs = 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 bs = 1 2 2 2 1 1 1 1 1 2 2 1 0 2 1 2 1 bs = 1 1 1 1 3 3 1 1 1 1 3 1 3 3 1 1 2 bs = 2 3 2 3 4 1 2 0 1 4 4 3 1 3 4 1 2 bs = 1 5 5 5 1 1 1 1 1 5 5 1 3 5 1 5 4 bs = 3 3 4 5 6 1 3 6 2 1 0 4 5 6 5 3 3 bs = 1 5 5 1 7 7 1 5 5 5 7 5 3 3 1 5 6 bs = 4 5 2 8 4 1 1 1 7 2 5 4 6 2 7 8 1 bs = 7 3 7 3 9 1 7 5 1 9 9 3 1 3 9 1 2 bs = 10 2 0 1 4 5 7 3 1 9 2 2 4 7 8 10 9 bs = 1 5 5 5 7 7 1 1 1 5 11 1 3 11 1 5 10 bs = 11 5 6 4 4 5 1 9 7 12 10 8 8 3 2 0 2 bs = 3 3 11 5 13 1 3 13 9 1 7 11 5 13 5 3 10 bs = 7 8 2 8 4 1 7 10 1 14 14 13 6 8 4 11 7 bs = 1 5 5 1 7 15 1 13 13 13 15 5 11 11 9 5 6 bs = 10 13 3 6 13 6 7 5 2 3 7 12 3 2 0 13 7 bs = 13 5 11 17 13 1 1 1 7 11 5 13 15 11 7 17 10 bs = 4 7 10 9 17 16 12 1 3 15 9 2 12 0 11 14 15 bs = 17 13 17 13 19 11 17 5 1 9 19 13 11 3 9 1 2 bs = 10 17 11 5 13 1 10 13 16 8 14 4 12 20 19 17 10 bs = 21 13 11 1 15 5 7 3 1 9 13 13 15 7 19 21 20 bs = 4 18 17 21 22 0 5 18 16 9 16 17 20 4 6 10 9 bs = 1 5 5 17 7 7 1 13 13 5 23 13 3 11 1 5 22 bs = 12 18 22 8 14 1 17 10 11 19 9 23 11 3 4 6 12 bs = 11 5 19 17 17 5 1 9 7 25 23 21 21 3 15 13 2 bs = 22 14 20 17 13 19 1 10 25 20 14 4 6 11 7 26 19 bs = 17 17 25 5 27 15 17 13 9 1 7 25 19 27 5 17 10 bs = 22 11 5 7 1 19 20 18 11 23 2 0 5 22 9 12 1 bs = 7 23 17 23 19 1 7 25 1 29 29 13 21 23 19 11 22 bs = 0 22 2 22 22 20 6 3 7 16 29 5 8 30 4 14 14 bs = 1 5 21 1 7 15 17 13 29 13 31 5 27 11 25 21 6 bs = 10 2 11 23 4 16 7 25 1 20 2 13 15 29 19 32 31 bs = 27 13 3 23 13 23 7 5 19 3 7 29 3 19 17 13 24 bs = 17 3 32 33 34 1 17 20 16 29 14 18 26 13 19 31 17 bs = 13 5 29 17 31 19 1 1 25 29 23 13 15 11 25 17 10 bs = 15 19 28 9 1 6 30 19 9 0 34 14 4 13 35 5 3 bs = 23 7 29 9 17 35 31 1 3 15 9 21 31 19 11 33 34 bs = 37 5 32 17 4 31 1 22 7 38 23 34 21 29 28 26 28 bs = 17 13 37 33 39 31 17 5 21 29 39 13 11 3 9 21 22 bs = 1 31 3 16 2 35 0 29 4 26 16 37 1 20 33 18 16 bs = 31 17 11 5 13 1 31 13 37 29 35 25 33 41 19 17 10 bs = 24 11 21 0 32 12 27 40 37 38 13 17 24 23 7 18 4 bs = 21 13 33 1 15 27 29 25 1 9 35 13 15 7 41 21 42 bs = 22 23 2 8 4 1 37 10 16 29 14 13 6 38 34 26 37 bs = 27 41 17 21 45 23 5 41 39 9 39 17 43 27 29 33 32 bs = 36 20 34 40 0 2 24 27 23 40 19 25 35 18 26 42 27 bs = 1 5 5 17 7 31 1 13 13 29 47 37 27 11 25 5 22 bs = 17 45 25 47 20 15 31 48 9 22 28 4 19 6 26 17 17 bs = 37 43 47 33 39 1 17 35 11 19 9 23 11 3 29 31 12 bs = 10 47 20 23 13 40 7 22 19 20 41 46 3 2 34 47 7 bs = 37 5 45 17 43 31 1 9 33 25 23 21 47 3 41 13 2 bs = 15 20 19 15 26 24 52 49 0 34 5 51 40 6 50 32 50 bs = 49 41 47 17 13 19 1 37 25 47 41 31 33 11 7 53 46 bs = 32 13 22 23 4 16 7 25 1 9 24 13 26 18 19 21 42 bs = 17 45 53 33 55 15 17 13 37 29 7 53 19 27 33 45 38 bs = 4 26 29 47 55 16 31 1 22 53 47 40 12 38 49 14 34 bs = 51 11 5 7 1 19 49 47 11 23 31 29 5 51 9 41 30 bs = 43 0 40 28 8 24 12 36 4 54 15 20 57 7 28 11 26 bs = 37 53 17 53 19 31 37 25 1 29 59 13 51 23 49 41 22 bs = 33 51 55 21 34 40 5 14 2 6 44 8 45 41 11 12 18 bs = 31 53 33 53 53 51 37 3 7 47 29 5 39 61 35 45 14 bs = 31 59 11 26 13 1 10 55 16 29 14 4 33 20 61 17 10 bs = 33 5 53 1 39 15 49 45 29 13 63 5 27 43 25 53 6 bs = 37 18 32 43 4 31 27 35 46 64 49 8 21 3 54 26 2 bs = 43 35 11 23 37 49 7 25 1 53 35 13 15 29 19 65 64 bs = 51 56 57 5 7 2 56 15 25 44 21 20 9 57 51 39 61 bs = 61 13 37 57 47 23 41 5 53 37 7 29 3 19 17 13 58 bs = 4 41 17 44 22 46 28 64 16 32 62 40 66 50 52 56 55 bs = 17 3 67 33 69 1 17 55 51 29 49 53 61 13 19 31 52 bs = 32 38 48 24 49 27 8 46 19 28 36 68 56 47 57 6 49 bs = 49 5 29 17 31 55 1 37 61 29 23 13 51 11 25 53 46 bs = 68 47 10 12 15 12 69 28 34 32 10 31 46 48 66 29 43 bs = 15 19 65 9 1 43 67 19 9 37 71 51 41 13 35 5 40 bs = 37 68 47 8 64 1 67 10 61 44 59 73 36 53 4 56 37 bs = 61 45 29 9 55 35 69 1 41 53 47 21 31 19 49 33 34 bs = 10 24 11 12 48 71 73 69 23 64 35 46 26 62 19 10 31 bs = 37 5 71 17 43 31 1 61 7 77 23 73 21 29 67 65 28 bs = 66 67 54 24 40 70 8 53 72 13 11 23 16 75 38 43 25 bs = 17 53 37 33 39 31 17 45 61 29 79 53 11 43 9 21 22 bs = 49 41 20 44 40 73 28 37 52 47 68 4 6 11 61 80 19 bs = 1 31 3 57 43 35 41 29 45 67 57 37 1 61 33 59 16 bs = 36 23 69 72 48 80 56 21 40 6 46 72 79 30 5 38 13 bs = 73 17 53 5 55 43 73 13 37 29 35 25 75 83 61 17 10 bs = 27 13 37 23 64 6 7 5 36 54 24 63 71 53 34 81 7 bs = 67 11 21 43 75 55 27 83 37 81 13 17 67 23 7 61 4 bs = 22 11 5 65 1 19 49 76 40 23 2 58 63 80 67 41 1 bs = 65 13 77 1 15 71 73 69 45 53 79 13 59 51 41 21 86 bs = 21 17 62 26 31 36 10 62 52 85 69 57 55 22 15 1 84 bs = 67 23 47 53 49 1 37 55 61 29 59 13 51 83 79 71 82 bs = 24 31 32 82 69 57 66 48 72 64 49 60 47 55 54 52 80 bs = ...

Suggested Problems

More from this Author95