Cody

# Problem 49. Sums with Excluded Digits

Solution 1230915

Submitted on 13 Jul 2017 by Salvatore Lacava
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))

digit = 1 total = 1 digit = 2 total = 3 digit = 3 total = 6 digit = 4 total = 10 digit = 5 digit = 6 total = 16 digit = 7 total = 23 digit = 8 total = 31 digit = 9 total = 40 digit = 1 0 total = 50 digit = 1 1 total = 61 digit = 1 2 total = 73 digit = 1 3 total = 86 digit = 1 4 total = 100 digit = 1 5 digit = 1 6 total = 116 digit = 1 7 total = 133 digit = 1 8 total = 151 digit = 1 9 total = 170 digit = 2 0 total = 190

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

digit = 1 total = 1 digit = 2 total = 3 digit = 3 total = 6 digit = 4 total = 10 digit = 5 digit = 6 total = 16 digit = 7 total = 23 digit = 8 total = 31 digit = 9 total = 40 digit = 1 0 total = 50

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

digit = 1 total = 1 digit = 2 total = 3 digit = 3 digit = 4 total = 7 digit = 5 total = 12 digit = 6 total = 18 digit = 7 total = 25 digit = 8 total = 33 digit = 9 total = 42 digit = 1 0 total = 52 digit = 1 1 total = 63 digit = 1 2 total = 75 digit = 1 3 digit = 1 4 total = 89 digit = 1 5 total = 104 digit = 1 6 total = 120 digit = 1 7 total = 137 digit = 1 8 total = 155 digit = 1 9 total = 174 digit = 2 0 total = 194 digit = 2 1 total = 215 digit = 2 2 total = 237 digit = 2 3 digit = 2 4 total = 261 digit = 2 5 total = 286 digit = 2 6 total = 312 digit = 2 7 total = 339 digit = 2 8 total = 367 digit = 2 9 total = 396 digit = 3 0 digit = 3 1 digit = 3 2 digit = 3 3

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!