Cody

Solution 2070943

Submitted on 27 Dec 2019 by Tim
  • Size: 32
  • 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
n = 13; y_correct = 17; assert(isequal(count_dig(n),y_correct))

2   Pass
n = 1339; y_correct = 4249; assert(isequal(count_dig(n),y_correct))

3   Pass
n = 0; y_correct = 0; assert(isequal(count_dig(n),y_correct))

4   Pass
n = 299; y_correct = 789; assert(isequal(count_dig(n),y_correct))

5   Pass
n = 10000; y_correct = 38894; assert(isequal(count_dig(n),y_correct)) % n=10000675820025; y_correct = 128898350369253; assert(isequal(count_dig(n),y_correct))