Cody

# Problem 1925. Smith numbers

Solution 1820848

Submitted on 21 May 2019 by Eric Mueller
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 ))

f = 2 2 f = '2 2' f = '22' f = 2 2 f = 4 x = 4 x = 4

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

f = 5 53 f = '5 53' f = '553' f = 5 5 3 f = 13 x = 2 6 5 x = 13

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

f = 2 2 3 7 7 f = '2 2 3 7 7' f = '22377' f = 2 2 3 7 7 f = 21 x = 5 8 8 x = 21

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

f = 2 3 181 f = '2 3 181' f = '23181' f = 2 3 1 8 1 f = 15 x = 1 0 8 6 x = 15

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

f = 3 5 5 65837 f = '3 5 5 65837' f = '35565837' f = 3 5 5 6 5 8 3 7 f = 42 x = 4 9 3 7 7 7 5 x = 42

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 ))

f = 2 2 2 5 5 5 f = '2 2 2 5 5 5' f = '222555' f = 2 2 2 5 5 5 f = 21 x = 1 0 0 0 x = 1

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 ))