Cody

# Problem 2161. Let's get back to school, and create multiplication tables

Solution 1818671

Submitted on 17 May 2019
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
start = 1; endno = 10; y_correct = [1 2 3 4 5 6 7 8 9 10; 2 4 6 8 10 12 14 16 18 20; 3 6 9 12 15 18 21 24 27 30; 4 8 12 16 20 24 28 32 36 40; 5 10 15 20 25 30 35 40 45 50; 6 12 18 24 30 36 42 48 54 60; 7 14 21 28 35 42 49 56 63 70; 8 16 24 32 40 48 56 64 72 80; 9 18 27 36 45 54 63 72 81 90; 10 20 30 40 50 60 70 80 90 100;]; assert(isequal(Tables(start, endno),y_correct))

table = [] table = 1 2 3 4 5 6 7 8 9 10 table = 1 2 3 4 5 6 7 8 9 10 2 4 6 8 10 12 14 16 18 20 table = 1 2 3 4 5 6 7 8 9 10 2 4 6 8 10 12 14 16 18 20 3 6 9 12 15 18 21 24 27 30 table = Columns 1 through 30 1 2 3 4 5 6 7 8 9 10 2 4 6 8 10 12 14 16 18 20 3 6 9 12 15 18 21 24 27 30 Columns 31 through 40 4 8 12 16 20 24 28 32 36 40 table = Columns 1 through 30 1 2 3 4 5 6 7 8 9 10 2 4 6 8 10 12 14 16 18 20 3 6 9 12 15 18 21 24 27 30 Columns 31 through 50 4 8 12 16 20 24 28 32 36 40 5 10 15 20 25 30 35 40 45 50 table = Columns 1 through 30 1 2 3 4 5 6 7 8 9 10 2 4 6 8 10 12 14 16 18 20 3 6 9 12 15 18 21 24 27 30 Columns 31 through 60 4 8 12 16 20 24 28 32 36 40 5 10 15 20 25 30 35 40 45 50 6 12 18 24 30 36 42 48 54 60 table = Columns 1 through 30 1 2 3 4 5 6 7 8 9 10 2 4 6 8 10 12 14 16 18 20 3 6 9 12 15 18 21 24 27 30 Columns 31 through 60 4 8 12 16 20 24 28 32 36 40 5 10 15 20 25 30 35 40 45 50 6 12 18 24 30 36 42 48 54 60 Columns 61 through 70 7 14 21 28 35 42 49 56 63 70 table = Columns 1 through 30 1 2 3 4 5 6 7 8 9 10 2 4 6 8 10 12 14 16 18 20 3 6 9 12 15 18 21 24 27 30 Columns 31 through 60 4 8 12 16 20 24 28 32 36 40 5 10 15 20 25 30 35 40 45 50 6 12 18 24 30 36 42 48 54 60 Columns 61 through 80 7 14 21 28 35 42 49 56 63 70 8 16 24 32 40 48 56 64 72 80 table = Columns 1 through 30 1 2 3 4 5 6 7 8 9 10 2 4 6 8 10 12 14 16 18 20 3 6 9 12 15 18 21 24 27 30 Columns 31 through 60 4 8 12 16 20 24 28 32 36 40 5 10 15 20 25 30 35 40 45 50 6 12 18 24 30 36 42 48 54 60 Columns 61 through 90 7 14 21 28 35 42 49 56 63 70 8 16 24 32 40 48 56 64 72 80 9 18 27 36 45 54 63 72 81 90 table = Columns 1 through 30 1 2 3 4 5 6 7 8 9 10 2 4 6 8 10 12 14 16 18 20 3 6 9 12 15 18 21 24 27 30 Columns 31 through 60 4 8 12 16 20 24 28 32 36 40 5 10 15 20 25 30 35 40 45 50 6 12 18 24 30 36 42 48 54 60 Columns 61 through 90 7 14 21 28 35 42 49 56 63 70 8 16 24 32 40 48 56 64 72 80 9 18 27 36 45 54 63 72 81 90 Columns 91 through 100 10 20 30 40 50 60 70 80 90 100 Columns 1 through 30 1 2 3 4 5 6 7 8 9 10 2 4 6 8 10 12 14 16 18 20 3 6 9 12 15 18 21 24 27 30 Columns 31 through 60 4 8 12 16 20 24 28 32 36 40 5 10 15 20 25 30 35 40 45 50 6 12 18 24 30 36 42 48 54 60 Columns 61 through 90 7 14 21 28 35 42 49 56 63 70 8 16 24 32 40 48 56 64 72 80 9 18 27 36 45 54 63 72 81 90 Columns 91 through 100 10 20 30 40 50 60 70 80 90 100

Assertion failed.

2   Fail
start = 17; endno = 19; y_correct = [17 18 19; 34 36 38; 51 54 57; 68 72 76; 85 90 95; 102 108 114; 119 126 133; 136 144 152; 153 162 171; 170 180 190;]; assert(isequal(Tables(start, endno),y_correct))

table = [] table = 17 34 51 68 85 102 119 136 153 170 table = 17 34 51 68 85 102 119 136 153 170 18 36 54 72 90 108 126 144 162 180 table = 17 34 51 68 85 102 119 136 153 170 18 36 54 72 90 108 126 144 162 180 19 38 57 76 95 114 133 152 171 190 17 34 51 68 85 102 119 136 153 170 18 36 54 72 90 108 126 144 162 180 19 38 57 76 95 114 133 152 171 190

Assertion failed.

3   Fail
start = 21; endno = 22; y_correct =[21 22; 42 44; 63 66; 84 88; 105 110; 126 132; 147 154; 168 176; 189 198; 210 220;] assert(isequal(Tables(start, endno),y_correct))

y_correct = 21 22 42 44 63 66 84 88 105 110 126 132 147 154 168 176 189 198 210 220 table = [] table = 21 42 63 84 105 126 147 168 189 210 table = 21 42 63 84 105 126 147 168 189 210 22 44 66 88 110 132 154 176 198 220 21 42 63 84 105 126 147 168 189 210 22 44 66 88 110 132 154 176 198 220

Assertion failed.