Cody

Solution 1208374

Submitted on 8 Jun 2017 by Jonas
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
assert(isequal(smith(4937775),1))

ans = logical 1

2   Pass
assert(isequal(smith(1164),0))

ans = logical 0

3   Pass
assert(isequal(smith(19683),1))

ans = logical 1

4   Pass
assert(isequal(smith(11),0)) % Remember - Smith numbers are composite

ans = logical 0

5   Pass
assert(isequal(smith(345741),1))

ans = logical 1

6   Pass
assert(isequal(smith(19876),0))

ans = logical 0

7   Pass
assert(isequal(smith(314159),0))

ans = logical 0

8   Pass
assert(isequal(smith(612985),1))

ans = logical 1

9   Pass
assert(isequal(smith(12379887),1))

ans = logical 1

10   Pass
assert(isequal(smith(23456789),0))

ans = logical 0