Cody

Solution 2108592

Submitted on 28 Jan 2020 by Jiahang Li
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))

l = 2 ans = 17

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

l = 4 ans = 4249

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

l = 1 ans = 0

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

l = 3 ans = 789

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))

l = 5 ans = 38894 l = 14 ans = 1.2890e+14