Cody

Solution 1945284

Submitted on 22 Sep 2019 by Augusto Mazzei
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; n_correct = 5; assert(isequal(bigNumRepeat(x),n_correct))

2 ------ 5 n = 5

2   Pass
x = 10; n_correct = inf; assert(isequal(bigNumRepeat(x),n_correct))

n = Inf

3   Pass
x = [3 7 33 51 67 192 329 678 680 4731 10016 10081 35197 35199 51783 517839 517842]; n_correct = [5 5 21 3 21 101 51 inf inf 501 626 626 5001 251 2501 12501 inf]; for ii = 1:numel(x) assert(isequal(bigNumRepeat(x(ii)),n_correct(ii))) end

3 ------ 5 n = 5 7 ------ 5 n = 5 3 3 ------ 21 n = 21 5 1 ------ 3 n = 3 6 7 ------ 21 n = 21 1 9 2 ------ 101 n = 101 3 2 9 ------ 51 n = 51 n = 12600 n = Inf n = Inf 4 7 3 1 ------ 501 n = 501 1 0 0 1 6 ------ 626 n = 626 1 0 0 8 1 ------ 626 n = 626 3 5 1 9 7 ------ 5001 n = 5001 3 5 1 9 9 ------ 251 n = 251 5 1 7 8 3 ------ 2501 n = 2501 5 1 7 8 3 9 ------ 12501 n = 12501 n = 12600 n = Inf

Suggested Problems

More from this Author4