Cody

Solution 1957773

Submitted on 3 Oct 2019 by tiwag7
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
x = 2; y_correct = [1 2 2]; assert(isequal(your_fcn_name(x),y_correct))

x = 1 k = 2 x = 1 2 k = 3 x = 1 2 2 k = 4 ans = 1 2 2

2   Pass
x = 5; y_correct = [1 2 2 3 3 3 4 4 4 4 5 5 5 5 5]; assert(isequal(your_fcn_name(x),y_correct))

x = 1 k = 2 x = 1 2 k = 3 x = 1 2 2 k = 4 x = 1 2 2 3 k = 5 x = 1 2 2 3 3 k = 6 x = 1 2 2 3 3 3 k = 7 x = 1 2 2 3 3 3 4 k = 8 x = 1 2 2 3 3 3 4 4 k = 9 x = 1 2 2 3 3 3 4 4 4 k = 10 x = 1 2 2 3 3 3 4 4 4 4 k = 11 x = 1 2 2 3 3 3 4 4 4 4 5 k = 12 x = 1 2 2 3 3 3 4 4 4 4 5 5 k = 13 x = 1 2 2 3 3 3 4 4 4 4 5 5 5 k = 14 x = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 k = 15 x = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 k = 16 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5

3   Pass
x = 10; y_correct = [1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 ... 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 ... 9 9 9 9 9 9 9 9 9 10 10 10 10 10 10 10 10 10 10]; assert(isequal(your_fcn_name(x),y_correct))

x = 1 k = 2 x = 1 2 k = 3 x = 1 2 2 k = 4 x = 1 2 2 3 k = 5 x = 1 2 2 3 3 k = 6 x = 1 2 2 3 3 3 k = 7 x = 1 2 2 3 3 3 4 k = 8 x = 1 2 2 3 3 3 4 4 k = 9 x = 1 2 2 3 3 3 4 4 4 k = 10 x = 1 2 2 3 3 3 4 4 4 4 k = 11 x = 1 2 2 3 3 3 4 4 4 4 5 k = 12 x = 1 2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= 32 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 32 8 8 k = 33 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 33 8 8 8 k = 34 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 34 8 8 8 8 k = 35 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 35 8 8 8 8 8 k = 36 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 36 8 8 8 8 8 8 k = 37 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 37 8 8 8 8 8 8 9 k = 38 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 38 8 8 8 8 8 8 9 9 k = 39 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 39 8 8 8 8 8 8 9 9 9 k = 40 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 40 8 8 8 8 8 8 9 9 9 9 k = 41 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 41 8 8 8 8 8 8 9 9 9 9 9 k = 42 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 42 8 8 8 8 8 8 9 9 9 9 9 9 k = 43 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 43 8 8 8 8 8 8 9 9 9 9 9 9 9 k = 44 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 44 8 8 8 8 8 8 9 9 9 9 9 9 9 9 k = 45 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 45 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 k = 46 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 46 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 10 k = 47 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 47 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 10 10 k = 48 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 48 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 10 10 10 k = 49 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 49 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 10 10 10 10 k = 50 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 50 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 10 10 10 10 10 k = 51 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 51 8...

4   Pass
x = 12; y_correct = [1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 ... 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 ... 9 9 9 9 9 9 9 9 9 10 10 10 10 10 10 10 10 10 10 ... 11 11 11 11 11 11 11 11 11 11 11 ... 12 12 12 12 12 12 12 12 12 12 12 12]; assert(isequal(your_fcn_name(x),y_correct))

x = 1 k = 2 x = 1 2 k = 3 x = 1 2 2 k = 4 x = 1 2 2 3 k = 5 x = 1 2 2 3 3 k = 6 x = 1 2 2 3 3 3 k = 7 x = 1 2 2 3 3 3 4 k = 8 x = 1 2 2 3 3 3 4 4 k = 9 x = 1 2 2 3 3 3 4 4 4 k = 10 x = 1 2 2 3 3 3 4 4 4 4 k = 11 x = 1 2 2 3 3 3 4 4 4 4 5 k = 12 x = 1 2 2 3 3 3 4 4 4 4 5 5 k = 13 x = 1 2 2 3 3 3 4 4 4 4 5 5 5 k = 14 x = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 k = 15 x = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 k = 16 x = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 k = 17 x = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 k = 18 x = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 k = 19 x = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 k = 20 x = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 k = 21 x = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 k = 22 x = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 k = 23 x = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 k = 24 x = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 k = 25 x = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 k = 26 x = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 k = 27 x = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 k = 28 x = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 k = 29 x = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 k = 30 x = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 k = 31 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Column 31 8 k = 32 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 32 8 8 k = 33 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 33 8 8 8 k = 34 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 34 8 8 8 8 k = 35 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 35 8 8 8 8 8 k = 36 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 36 8 8 8 8 8 8 k = 37 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 37 8 8 8 8 8 8 9 k = 38 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 38 8 8 8 8 8 8 9 9 k = 39 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 39 8 8 8 8 8 8 9 9 9 k = 40 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 40 8 8 8 8 8 8 9 9 9 9 k = 41 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 41 8 8 8 8 8 8 9 9 9 9 9 k = 42 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 42 8 8 8 8 8 8 9 9 9 9 9 9 k = 43 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 43 8 8 8 8 8 8 9 9 9 9 9 9 9 k = 44 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 44 8 8 8 8 8 8 9 9 9 9 9 9 9 9 k = 45 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 45 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 k = 46 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 46 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 10 k = 47 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 47 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 10 10 k = 48 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 48 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 10 10 10 k = 49 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 49 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 10 10 10 10 k = 50 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 50 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 10 10 10 10 10 k = 51 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 51 8...

5   Pass
x = 9; y_correct = [1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 ... 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 ... 9 9 9 9 9 9 9 9 9]; assert(isequal(your_fcn_name(x),y_correct))

x = 1 k = 2 x = 1 2 k = 3 x = 1 2 2 k = 4 x = 1 2 2 3 k = 5 x = 1 2 2 3 3 k = 6 x = 1 2 2 3 3 3 k = 7 x = 1 2 2 3 3 3 4 k = 8 x = 1 2 2 3 3 3 4 4 k = 9 x = 1 2 2 3 3 3 4 4 4 k = 10 x = 1 2 2 3 3 3 4 4 4 4 k = 11 x = 1 2 2 3 3 3 4 4 4 4 5 k = 12 x = 1 2 2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32 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 32 8 8 k = 33 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 33 8 8 8 k = 34 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 34 8 8 8 8 k = 35 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 35 8 8 8 8 8 k = 36 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 36 8 8 8 8 8 8 k = 37 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 37 8 8 8 8 8 8 9 k = 38 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 38 8 8 8 8 8 8 9 9 k = 39 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 39 8 8 8 8 8 8 9 9 9 k = 40 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 40 8 8 8 8 8 8 9 9 9 9 k = 41 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 41 8 8 8 8 8 8 9 9 9 9 9 k = 42 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 42 8 8 8 8 8 8 9 9 9 9 9 9 k = 43 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 43 8 8 8 8 8 8 9 9 9 9 9 9 9 k = 44 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 44 8 8 8 8 8 8 9 9 9 9 9 9 9 9 k = 45 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 45 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 k = 46 ans = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 45 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9

6   Pass
x = 7; y_correct = [1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 ... 6 6 6 6 6 6 7 7 7 7 7 7 7]; assert(isequal(your_fcn_name(x),y_correct))

x = 1 k = 2 x = 1 2 k = 3 x = 1 2 2 k = 4 x = 1 2 2 3 k = 5 x = 1 2 2 3 3 k = 6 x = 1 2 2 3 3 3 k = 7 x = 1 2 2 3 3 3 4 k = 8 x = 1 2 2 3 3 3 4 4 k = 9 x = 1 2 2 3 3 3 4 4 4 k = 10 x = 1 2 2 3 3 3 4 4 4 4 k = 11 x = 1 2 2 3 3 3 4 4 4 4 5 k = 12 x = 1 2 2 3 3 3 4 4 4 4 5 5 k = 13 x = 1 2 2 3 3 3 4 4 4 4 5 5 5 k = 14 x = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 k = 15 x = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 k = 16 x = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 k = 17 x = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 k = 18 x = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 k = 19 x = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 k = 20 x = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 k = 21 x = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 k = 22 x = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 k = 23 x = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 k = 24 x = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 k = 25 x = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 k = 26 x = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 k = 27 x = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 k = 28 x = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 k = 29 ans = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7

7   Pass
x = 15; y_correct = [1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 ... 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 ... 9 9 9 9 9 9 9 9 9 10 10 10 10 10 10 10 10 10 10 ... 11 11 11 11 11 11 11 11 11 11 11 ... 12 12 12 12 12 12 12 12 12 12 12 12 ... 13 13 13 13 13 13 13 13 13 13 13 13 13 ... 14 14 14 14 14 14 14 14 14 14 14 14 14 14 ... 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15]; assert(isequal(your_fcn_name(x),y_correct))

x = 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7 7 k = 29 x = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 k = 30 x = 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 k = 31 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Column 31 8 k = 32 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 32 8 8 k = 33 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 33 8 8 8 k = 34 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 34 8 8 8 8 k = 35 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 35 8 8 8 8 8 k = 36 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 36 8 8 8 8 8 8 k = 37 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 37 8 8 8 8 8 8 9 k = 38 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 38 8 8 8 8 8 8 9 9 k = 39 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 39 8 8 8 8 8 8 9 9 9 k = 40 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 40 8 8 8 8 8 8 9 9 9 9 k = 41 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 41 8 8 8 8 8 8 9 9 9 9 9 k = 42 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 42 8 8 8 8 8 8 9 9 9 9 9 9 k = 43 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 43 8 8 8 8 8 8 9 9 9 9 9 9 9 k = 44 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 44 8 8 8 8 8 8 9 9 9 9 9 9 9 9 k = 45 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 45 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 k = 46 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 46 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 10 k = 47 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 47 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 10 10 k = 48 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 48 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 10 10 10 k = 49 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 49 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 10 10 10 10 k = 50 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 50 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 10 10 10 10 10 k = 51 x = Columns 1 through 30 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 Columns 31 through 51 8...