Cody

# Problem 1951. Better Index Number

Solution 1889503

Submitted on 1 Aug 2019
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   Fail
n = 1; max_n = 9; n_str = '1'; assert(isequal(betterIndexNum(n,max_n),n_str))

6

Output argument "ans" (and maybe others) not assigned during call to "betterIndexNum". Error in Test1 (line 4) assert(isequal(betterIndexNum(n,max_n),n_str))

2   Fail
n = 1; max_n = 28; n_str = '01'; assert(isequal(betterIndexNum(n,max_n),n_str))

6

Output argument "ans" (and maybe others) not assigned during call to "betterIndexNum". Error in Test2 (line 4) assert(isequal(betterIndexNum(n,max_n),n_str))

3   Fail
n = 28; max_n = 848984; n_str = '000028'; assert(isequal(betterIndexNum(n,max_n),n_str))

06

Output argument "ans" (and maybe others) not assigned during call to "betterIndexNum". Error in Test3 (line 4) assert(isequal(betterIndexNum(n,max_n),n_str))

4   Fail
n = 10; max_n = 100; n_str = '010'; assert(isequal(betterIndexNum(n,max_n),n_str))

06

Output argument "ans" (and maybe others) not assigned during call to "betterIndexNum". Error in Test4 (line 4) assert(isequal(betterIndexNum(n,max_n),n_str))