Cody

# Problem 49. Sums with Excluded Digits

Solution 1950427

Submitted on 27 Sep 2019 by Le Cong Hieu
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))

m = '5' s = 1 m = '5' s = 3 m = '5' s = 6 m = '5' s = 10 m = '5' s = 10 m = '5' s = 16 m = '5' s = 23 m = '5' s = 31 m = '5' s = 40 m = '5' s = 50 m = '5' s = 61 m = '5' s = 73 m = '5' s = 86 m = '5' s = 100 m = '5' s = 100 m = '5' s = 116 m = '5' s = 133 m = '5' s = 151 m = '5' s = 170 m = '5' s = 190

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

m = '5' s = 1 m = '5' s = 3 m = '5' s = 6 m = '5' s = 10 m = '5' s = 10 m = '5' s = 16 m = '5' s = 23 m = '5' s = 31 m = '5' s = 40 m = '5' s = 50

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

m = '3' s = 1 m = '3' s = 3 m = '3' s = 3 m = '3' s = 7 m = '3' s = 12 m = '3' s = 18 m = '3' s = 25 m = '3' s = 33 m = '3' s = 42 m = '3' s = 52 m = '3' s = 63 m = '3' s = 75 m = '3' s = 75 m = '3' s = 89 m = '3' s = 104 m = '3' s = 120 m = '3' s = 137 m = '3' s = 155 m = '3' s = 174 m = '3' s = 194 m = '3' s = 215 m = '3' s = 237 m = '3' s = 237 m = '3' s = 261 m = '3' s = 286 m = '3' s = 312 m = '3' s = 339 m = '3' s = 367 m = '3' s = 396 m = '3' s = 396 m = '3' s = 396 m = '3' s = 396 m = '3' s = 396