Cody

Solution 1926637

Submitted on 9 Sep 2019 by Nikolaos Nikolaou
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 4 5] n = 4 y_correct = [1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 5 5 5 5] assert(isequal(NplicateMe(x,n),y_correct))

x = 1 2 3 4 5 n = 4 y_correct = 1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 5 5 5 5 t = 1 1 1 1 y = 1 1 1 1 t = 2 2 2 2 y = 1 1 1 1 2 2 2 2 t = 3 3 3 3 y = 1 1 1 1 2 2 2 2 3 3 3 3 t = 4 4 4 4 y = 1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 t = 5 5 5 5 y = 1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 5 5 5 5

2   Pass
x = [10 7 8] n = 2 y_correct = [10 10 7 7 8 8] assert(isequal(NplicateMe(x,n),y_correct))

x = 10 7 8 n = 2 y_correct = 10 10 7 7 8 8 t = 10 10 y = 10 10 t = 7 7 y = 10 10 7 7 t = 8 8 y = 10 10 7 7 8 8