Cody

Problem 45352. Number generator

Solution 2947696

Submitted on 15 Sep 2020 by Alfonso Nieto-Castanon
  • Size: 16
  • 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
assert(isequal(number_gen(74562),168))

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

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

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

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

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

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

Suggested Problems

More from this Author149

Community Treasure Hunt

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

Start Hunting!