Cody

# Problem 42323. With apologies to William Blake

Solution 3384828

Submitted on 26 Oct 2020
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(symmetry(27),3))

Undefined function 'symmetry' for input arguments of type 'double'. Error in Test1 (line 1) assert(isequal(symmetry(27),3))

2   Fail
assert(isequal(symmetry(801),0))

Undefined function 'symmetry' for input arguments of type 'double'. Error in Test2 (line 1) assert(isequal(symmetry(801),0))

3   Fail
assert(isequal(symmetry(900),100))

Undefined function 'symmetry' for input arguments of type 'double'. Error in Test3 (line 1) assert(isequal(symmetry(900),100))

4   Fail
assert(isequal(symmetry(88887),1))

Undefined function 'symmetry' for input arguments of type 'double'. Error in Test4 (line 1) assert(isequal(symmetry(88887),1))

5   Fail
assert(isequal(symmetry(1234567),65433))

Undefined function 'symmetry' for input arguments of type 'double'. Error in Test5 (line 1) assert(isequal(symmetry(1234567),65433))

6   Fail
assert(isequal(symmetry(34567890),3432110))

Undefined function 'symmetry' for input arguments of type 'double'. Error in Test6 (line 1) assert(isequal(symmetry(34567890),3432110))

7   Fail
format long g x=ceil(1e9*rand); j=389e9+x assert(isequal(8e11-symmetry(j),j))

j = 389151583850

Undefined function 'symmetry' for input arguments of type 'double'. Error in Test7 (line 4) assert(isequal(8e11-symmetry(j),j))

8   Fail
format long g x=ceil(1e10*rand); j=889e10+x v=symmetry(j); assert(isequal(1e13-v,j))

j = 8899216914455

Undefined function 'symmetry' for input arguments of type 'double'. Error in Test8 (line 4) v=symmetry(j);

9   Fail
x=2^40-1; assert(isequal(symmetry(symmetry(symmetry(symmetry(x)))),7775))

Undefined function 'symmetry' for input arguments of type 'double'. Error in Test9 (line 2) assert(isequal(symmetry(symmetry(symmetry(symmetry(x)))),7775))

### Community Treasure Hunt

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

Start Hunting!