Cody

# Problem 49. Sums with Excluded Digits

Solution 425882

Submitted on 4 Apr 2014 by Mick Warehime
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))

key = 5 sm = 0 j = 2 sm = 1 sm = 3 sm = 6 sm = 10 sm = 10 sm = 16 sm = 23 sm = 31 sm = 40 sm = 50 sm = 61 sm = 73 sm = 86 sm = 100 sm = 100 sm = 116 sm = 133 sm = 151 sm = 170 sm = 190

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

key = 5 sm = 0 j = 2 sm = 1 sm = 3 sm = 6 sm = 10 sm = 10 sm = 16 sm = 23 sm = 31 sm = 40 sm = 50

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

key = 3 sm = 0 j = 2 sm = 1 sm = 3 sm = 3 sm = 7 sm = 12 sm = 18 sm = 25 sm = 33 sm = 42 sm = 52 sm = 63 sm = 75 sm = 75 sm = 89 sm = 104 sm = 120 sm = 137 sm = 155 sm = 174 sm = 194 sm = 215 sm = 237 sm = 237 sm = 261 sm = 286 sm = 312 sm = 339 sm = 367 sm = 396 sm = 396 sm = 396 sm = 396 sm = 396