Cody

Solution 1252892

Submitted on 17 Aug 2017 by Chris Cleveland
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 = '5*3'; y_correct = '33333'; assert(isequal(repchar(x),y_correct))

2   Pass
x = '7*a'; y_correct = 'aaaaaaa'; assert(isequal(repchar(x),y_correct))

3   Pass
x = '1*4'; y_correct = '4'; assert(isequal(repchar(x),y_correct))

4   Pass
x = '-HGuad157455*337891u5'; y_correct = '-HGuad157453333337891u5'; assert(isequal(repchar(x),y_correct))

5   Pass
x = '[11]*9'; y_correct = '99999999999'; assert(isequal(repchar(x),y_correct))

6   Pass
x = 'abcA;IK4598716[11]*9iobofd89156'; y_correct = 'abcA;IK459871699999999999iobofd89156'; assert(isequal(repchar(x),y_correct))

7   Pass
x = '5*34*7'; y_correct = '333337777'; assert(isequal(repchar(x),y_correct))

8   Pass
x = '-abc5*3abc4*7abc-'; y_correct = '-abc33333abc7777abc-'; assert(isequal(repchar(x),y_correct))

9   Pass
x = ']1478151*38791561-3*487945612['; y_correct = ']14781538791561-44487945612['; assert(isequal(repchar(x),y_correct))

10   Pass
x = '5*34*75*5'; y_correct = '33333777755555'; assert(isequal(repchar(x),y_correct))

11   Pass
x = '5*34*7[10]*5'; y_correct = '3333377775555555555'; assert(isequal(repchar(x),y_correct))

12   Pass
x = '[bdD8-472*3565b1fd4*7rejyyng599811f[10]*5-5116fd1b]'; y_correct = '[bdD8-4733565b1fd7777rejyyng599811f5555555555-5116fd1b]'; assert(isequal(repchar(x),y_correct))

13   Pass
x = '[]-156fd1s56bf156ds'; y_correct = '[]-156fd1s56bf156ds'; assert(isequal(repchar(x),y_correct))

Suggested Problems

More from this Author58