Cody

# Problem 1925. Smith numbers

Solution 3100811

Submitted on 7 Oct 2020 by Alex
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
x = 4; tf_correct = true; assert(isequal(isSmith(x),tf_correct ))

b = 4 b = 2 b = 0

2   Pass
x = 265; tf_correct = true; assert(isequal(isSmith(x),tf_correct ))

b = 13 b = 8 b = 0

3   Pass
x = 588; tf_correct = true; assert(isequal(isSmith(x),tf_correct ))

b = 21 b = 19 b = 17 b = 14 b = 7 b = 0

4   Pass
x = 1086; tf_correct = true; assert(isequal(isSmith(x),tf_correct ))

b = 15 b = 13 b = 10 b = 0

5   Pass
x = 4937775; tf_correct = true; assert(isequal(isSmith(x),tf_correct ))

b = 42 b = 39 b = 34 b = 29 b = 0

6   Pass
x = 5; tf_correct = false; assert(isequal(isSmith(x),tf_correct ))

7   Pass
x = 1000; tf_correct = false; assert(isequal(isSmith(x),tf_correct ))

b = 1 b = -1 b = -3 b = -5 b = -10 b = -15 b = -20

8   Pass
x = 94.1; tf_correct = false; assert(isequal(isSmith(x),tf_correct ))

9   Pass
x = 202.689; tf_correct = false; assert(isequal(isSmith(x),tf_correct ))

10   Pass
x = pi; tf_correct = false; assert(isequal(isSmith(x),tf_correct ))

11   Pass
x = -4; tf_correct = false; assert(isequal(isSmith(x),tf_correct ))

### Community Treasure Hunt

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

Start Hunting!