Cody

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

Solution 1274470

Submitted on 22 Sep 2017
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   Fail
assert(isequal(smith(4937775),1))

a = 65487 b = 3 5 5 65837

Assertion failed.

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

a = 1116 b = 2 2 3 97

Assertion failed.

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

a = 19635 b = 3 3 3 3 3 3 3 3 3

Assertion failed.

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

a = -37 b = 11

Assertion failed.

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

a = 65487 b = 3 11 10477

Assertion failed.

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

a = 19828 b = 2 2 4969

Assertion failed.

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

a = 65487 b = 314159

Assertion failed.

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

a = 65487 b = 5 122597

Assertion failed.

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

a = 65487 b = 3 3 13 19 5569

Assertion failed.

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

a = 65487 b = 23456789

Assertion failed.