Cody

Problem 44230. I'm going to enjoy watching you calculate, Mr Anderson

Solution 1252018

Submitted on 16 Aug 2017 by Chris Cleveland
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))

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

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

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

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

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

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

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

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

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