Cody

Solution 1946754

Submitted on 23 Sep 2019 by Khanh Le Quang
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
n = 10; y_correct = (0:2:n); assert(isequal(zeroToNby2(n),y_correct))

var1 = -2 var1 = 0 y = 0 var1 = 2 y = 0 2 var1 = 4 y = 0 2 4 var1 = 6 y = 0 2 4 6 var1 = 8 y = 0 2 4 6 8 var1 = 10 y = 0 2 4 6 8 10

2   Pass
n = 102; y_correct = (0:2:n); assert(isequal(zeroToNby2(n),y_correct))

var1 = -2 var1 = 0 y = 0 var1 = 2 y = 0 2 var1 = 4 y = 0 2 4 var1 = 6 y = 0 2 4 6 var1 = 8 y = 0 2 4 6 8 var1 = 10 y = 0 2 4 6 8 10 var1 = 12 y = 0 2 4 6 8 10 12 var1 = 14 y = 0 2 4 6 8 10 12 14 var1 = 16 y = 0 2 4 6 8 10 12 14 16 var1 = 18 y = 0 2 4 6 8 10 12 14 16 18 var1 = 20 y = 0 2 4 6 8 10 12 14 16 18 20 var1 = 22 y = 0 2 4 6 8 10 12 14 16 18 20 22 var1 = 24 y = 0 2 4 6 8 10 12 14 16 18 20 22 24 var1 = 26 y = 0 2 4 6 8 10 12 14 16 18 20 22 24 26 var1 = 28 y = 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 var1 = 30 y = 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 var1 = 32 y = 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 var1 = 34 y = 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 var1 = 36 y = 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 var1 = 38 y = 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 var1 = 40 y = 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 var1 = 42 y = 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 var1 = 44 y = 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 var1 = 46 y = 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 var1 = 48 y = 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 var1 = 50 y = 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 var1 = 52 y = 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 var1 = 54 y = 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 var1 = 56 y = 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 var1 = 58 y = 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 var1 = 60 y = Columns 1 through 30 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 Column 31 60 var1 = 62 y = Columns 1 through 30 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 Columns 31 through 32 60 62 var1 = 64 y = Columns 1 through 30 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 Columns 31 through 33 60 62 64 var1 = 66 y = Columns 1 through 30 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 Columns 31 through 34 60 62 64 66 var1 = 68 y = Columns 1 through 30 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 Columns 31 through 35 60 62 64 66 68 var1 = 70 y = Columns 1 through 30 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 Columns 31 through 36 60 62 64 66 68 70 var1 = 72 y = Columns 1 through 30 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 Columns 31 through 37 60 62 64 66 68 70 72 var1 = 74 y = Columns 1 through 30 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 Columns 31 through 38 60 62 64 66 68 70 72 74 var1 = 76 y = Columns 1 through 30 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 Columns 31 through 39 60 62 64 66 68 70 72 74 76 var1 = 78 y = Columns 1 through 30 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 Columns 31 through 40 60 62 64 66 68 70 72 74 76 78 var1 = 80 y = Columns 1 through 30 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 Columns 31 through 41 60 62 64 66 68 70 72 74 76 78 80 var1 = 82 y = Columns 1 through 30 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 Columns 31 through 42 60 62 64 66 68 70 72 74 76 78 80 82 var1 = 84 y = Columns 1 through 30 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 Columns 31 through 43 60 62 64 66 68 70 72 74 76 78 80 82 84 var1 = 86 y = Columns 1 through 30 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 Columns 31 through 44 60 62 64 66 68 70 72 74 76 78 80 82 84 86 var1 = 88 y = Columns 1 through 30 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 Columns 31 through 45 60 62 64 66 68 70 72 74 76 78 80 82 84 86 88 var1 = 90 y = Columns 1 through 30 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 Columns 31 through 46 60 62 64 66 68 70 72 74 76 78 80 82 84 86 88 90 var1 = 92 y = Columns 1 through 30 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 Columns 31 through 47 60 62 64 66 68 70 72 74 76 78 80 82 84 86 88 90 92 var1 = 94 y = Columns 1 through 30 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 Columns 31 through 48 60 62 64 66 68 70 72 74 76 78 80 82 84 86 88 90 92 94 var1 = 96 y = Columns 1 through 30 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 Columns 31 through 49 60 62 64 66 68 70 72 74 76 78 80 82 84 86 88 90 92 94 96 var1 = 98 y = Columns 1 through 30 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 Columns 31 through 50 60 62 64 66 68 70 72 74 76 78 80 82 84 86 88 90 92 94 96 98 var1 = 100 y = Columns 1 through 30 0 2 4 6 ...

3   Pass
n = 73; y_correct = (0:2:n); assert(isequal(zeroToNby2(n),y_correct))

var1 = -2 var1 = 0 y = 0 var1 = 2 y = 0 2 var1 = 4 y = 0 2 4 var1 = 6 y = 0 2 4 6 var1 = 8 y = 0 2 4 6 8 var1 = 10 y = 0 2 4 6 8 10 var1 = 12 y = 0 2 4 6 8 10 12 var1 = 14 y = 0 2 4 6 8 10 12 14 var1 = 16 y = 0 2 4 6 8 10 12 14 16 var1 = 18 y = 0 2 4 6 8 10 12 14 16 18 var1 = 20 y = 0 2 4 6 8 10 12 14 16 18 20 var1 = 22 y = 0 2 4 6 8 10 12 14 16 18 20 22 var1 = 24 y = 0 2 4 6 8 10 12 14 16 18 20 22 24 var1 = 26 y = 0 2 4 6 8 10 12 14 16 18 20 22 24 26 var1 = 28 y = 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 var1 = 30 y = 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 var1 = 32 y = 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 var1 = 34 y = 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 var1 = 36 y = 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 var1 = 38 y = 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 var1 = 40 y = 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 var1 = 42 y = 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 var1 = 44 y = 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 var1 = 46 y = 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 var1 = 48 y = 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 var1 = 50 y = 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 var1 = 52 y = 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 var1 = 54 y = 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 var1 = 56 y = 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 var1 = 58 y = 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 var1 = 60 y = Columns 1 through 30 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 Column 31 60 var1 = 62 y = Columns 1 through 30 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 Columns 31 through 32 60 62 var1 = 64 y = Columns 1 through 30 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 Columns 31 through 33 60 62 64 var1 = 66 y = Columns 1 through 30 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 Columns 31 through 34 60 62 64 66 var1 = 68 y = Columns 1 through 30 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 Columns 31 through 35 60 62 64 66 68 var1 = 70 y = Columns 1 through 30 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 Columns 31 through 36 60 62 64 66 68 70 var1 = 72 y = Columns 1 through 30 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 Columns 31 through 37 60 62 64 66 68 70 72