Cody

Solution 478085

Submitted on 25 Jul 2014 by Christopher Creutzig
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 = 20; m = 5; total = 190; assert(isequal(no_digit_sum(n,m),total))

y = 1 y = 2 y = 3 y = 4 y = 0 y = 6 y = 7 y = 8 y = 9 y = 10 y = 11 y = 12 y = 13 y = 14 y = 0 y = 16 y = 17 y = 18 y = 19 y = 20 ans = 190

2   Pass
%% n = 10; m = 5; total = 50; assert(isequal(no_digit_sum(n,m),total))

y = 1 y = 2 y = 3 y = 4 y = 0 y = 6 y = 7 y = 8 y = 9 y = 10 ans = 50

3   Pass
%% n = 33; m = 3; total = 396; assert(isequal(no_digit_sum(n,m),total))

y = 1 y = 2 y = 0 y = 4 y = 5 y = 6 y = 7 y = 8 y = 9 y = 10 y = 11 y = 12 y = 0 y = 14 y = 15 y = 16 y = 17 y = 18 y = 19 y = 20 y = 21 y = 22 y = 0 y = 24 y = 25 y = 26 y = 27 y = 28 y = 29 y = 0 y = 0 y = 0 y = 0 ans = 396