Cody

# Problem 45352. Number generator

Solution 2171301

Submitted on 23 Mar 2020
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
assert(isequal(number_gen(74562),168))

num = 7 4 5 6 2

Unrecognized function or variable 's'. Error in number_gen (line 8) s = s + num(i) ; Error in Test1 (line 1) assert(isequal(number_gen(74562),168))

2   Fail
assert(isequal(number_gen(74561562),16713))

num = 7 4 5 6 1 5 6 2

Unrecognized function or variable 's'. Error in number_gen (line 8) s = s + num(i) ; Error in Test2 (line 1) assert(isequal(number_gen(74561562),16713))

3   Fail
assert(isequal(number_gen(111111111111),222222))

num = 1 1 1 1 1 1 1 1 1 1 1 1

Unrecognized function or variable 's'. Error in number_gen (line 8) s = s + num(i) ; Error in Test3 (line 1) assert(isequal(number_gen(111111111111),222222))

4   Fail
assert(isequal(number_gen(1111111111111),2222221))

num = 1 1 1 1 1 1 1 1 1 1 1 1 1

Unrecognized function or variable 's'. Error in number_gen (line 8) s = s + num(i) ; Error in Test4 (line 1) assert(isequal(number_gen(1111111111111),2222221))

5   Fail
assert(isequal(number_gen(3456696524532), 122111115))

num = 3 4 5 6 6 9 6 5 2 4 5 3 2

Unrecognized function or variable 's'. Error in number_gen (line 8) s = s + num(i) ; Error in Test5 (line 1) assert(isequal(number_gen(3456696524532), 122111115))

6   Fail
assert(isequal(number_gen(100000024008),15))

num = 1 0 0 0 0 0 0 2 4 0 0 8

Unrecognized function or variable 's'. Error in number_gen (line 8) s = s + num(i) ; Error in Test6 (line 1) assert(isequal(number_gen(100000024008),15))

7   Fail
assert(isequal(number_gen(288624888862),70))

num = 2 8 8 6 2 4 8 8 8 8 6 2

Unrecognized function or variable 's'. Error in number_gen (line 8) s = s + num(i) ; Error in Test7 (line 1) assert(isequal(number_gen(288624888862),70))