Cody

Solution 2097352

Submitted on 18 Jan 2020 by Asif Newaz
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=[1 2 3 6 8 4 9]; n=1; assert(isequal(rept(x),n))

a = 1 2 3 4 6 8 9 b = 1 1 1 1 1 1 1 n = 1

2   Pass
x=[2 3 6 2 6 2 2 -2 -7]; n=4; assert(isequal(rept(x),n))

a = -7 -2 2 3 6 b = 1 1 4 1 2 n = 4

3   Pass
x=[2 3 6 2 6 2 2 -2 -7 -7 6 6 6]; n=5; assert(isequal(rept(x),n))

a = -7 -2 2 3 6 b = 2 1 4 1 5 n = 5

4   Pass
x=[8 8 8 6 8 8 8]; n=6; assert(isequal(rept(x),n))

a = 6 8 b = 1 6 n = 6