Cody

Problem 47573. Crea un vector de enteros repitiendo sus términos de la siguiente forma 122333444455555

Solution 3765593

Submitted on 21 Nov 2020 by David Hill
  • Size: 15
  • This is the leading solution.
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 = 1; y_correct = 1; assert(isequal(UltimoNumero(n),y_correct))

2   Pass
n = 2; y_correct = [1,2,2]; assert(isequal(UltimoNumero(n),y_correct))

3   Pass
n = 6; y_correct = [1,2,2,3,3,3,4,4,4,4,5,5,5,5,5,6,6,6,6,6,6]; assert(isequal(UltimoNumero(n),y_correct))

Suggested Problems

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!