Cody

# Problem 1925. Smith numbers

Solution 2904823

Submitted on 2 Sep 2020 by Jerry Wright
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 ))

sx = '4' sf = '2 2' tf = logical 1

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

sx = '265' sf = '5 53' tf = logical 1

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

sx = '588' sf = '2 2 3 7 7' tf = logical 1

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

sx = '1086' sf = '2 3 181' tf = logical 1

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

sx = '4937775' sf = '3 5 5 65837' tf = logical 1

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

tf = logical 0

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

sx = '1000' sf = '2 2 2 5 5 5' tf = logical 0

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

tf = logical 0

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

tf = logical 0

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

tf = logical 0

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

tf = logical 0

### Community Treasure Hunt

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

Start Hunting!