Cody

Problem 1082. Lychrel Number Test (Inspired by Project Euler Problem 55)

Solution 2628184

Submitted on 29 Jun 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(islychrel(3763));

Unrecognized function or variable 'digs'. Error in islychrel>fix (line 20) digs = [mente,0]+[0,mod(digs,10)]; Error in islychrel>addReverse (line 14) digs = fix(d+fliplr(d)); Error in islychrel (line 4) d = addReverse(d) Error in Test1 (line 1) assert(islychrel(3763));

2   Fail
assert(islychrel(5943));

Unrecognized function or variable 'digs'. Error in islychrel>fix (line 20) digs = [mente,0]+[0,mod(digs,10)]; Error in islychrel>addReverse (line 14) digs = fix(d+fliplr(d)); Error in islychrel (line 4) d = addReverse(d) Error in Test2 (line 1) assert(islychrel(5943));

3   Fail
assert(islychrel(4709));

Unrecognized function or variable 'digs'. Error in islychrel>fix (line 20) digs = [mente,0]+[0,mod(digs,10)]; Error in islychrel>addReverse (line 14) digs = fix(d+fliplr(d)); Error in islychrel (line 4) d = addReverse(d) Error in Test3 (line 1) assert(islychrel(4709));

4   Fail
assert(~islychrel(3664));

Unrecognized function or variable 'digs'. Error in islychrel>fix (line 20) digs = [mente,0]+[0,mod(digs,10)]; Error in islychrel>addReverse (line 14) digs = fix(d+fliplr(d)); Error in islychrel (line 4) d = addReverse(d) Error in Test4 (line 1) assert(~islychrel(3664));

5   Fail
assert(~islychrel(3692));

Unrecognized function or variable 'digs'. Error in islychrel>fix (line 20) digs = [mente,0]+[0,mod(digs,10)]; Error in islychrel>addReverse (line 14) digs = fix(d+fliplr(d)); Error in islychrel (line 4) d = addReverse(d) Error in Test5 (line 1) assert(~islychrel(3692));

6   Fail
assert(islychrel(196));

Unrecognized function or variable 'digs'. Error in islychrel>fix (line 20) digs = [mente,0]+[0,mod(digs,10)]; Error in islychrel>addReverse (line 14) digs = fix(d+fliplr(d)); Error in islychrel (line 4) d = addReverse(d) Error in Test6 (line 1) assert(islychrel(196));

7   Fail
assert(islychrel(8619));

Unrecognized function or variable 'digs'. Error in islychrel>fix (line 20) digs = [mente,0]+[0,mod(digs,10)]; Error in islychrel>addReverse (line 14) digs = fix(d+fliplr(d)); Error in islychrel (line 4) d = addReverse(d) Error in Test7 (line 1) assert(islychrel(8619));

8   Fail
assert(islychrel(9898));

Unrecognized function or variable 'digs'. Error in islychrel>fix (line 20) digs = [mente,0]+[0,mod(digs,10)]; Error in islychrel>addReverse (line 14) digs = fix(d+fliplr(d)); Error in islychrel (line 4) d = addReverse(d) Error in Test8 (line 1) assert(islychrel(9898));

9   Fail
assert(islychrel(9344));

Unrecognized function or variable 'digs'. Error in islychrel>fix (line 20) digs = [mente,0]+[0,mod(digs,10)]; Error in islychrel>addReverse (line 14) digs = fix(d+fliplr(d)); Error in islychrel (line 4) d = addReverse(d) Error in Test9 (line 1) assert(islychrel(9344));

10   Fail
assert(islychrel(9884));

Unrecognized function or variable 'digs'. Error in islychrel>fix (line 20) digs = [mente,0]+[0,mod(digs,10)]; Error in islychrel>addReverse (line 14) digs = fix(d+fliplr(d)); Error in islychrel (line 4) d = addReverse(d) Error in Test10 (line 1) assert(islychrel(9884));

11   Fail
assert(islychrel(4852));

Unrecognized function or variable 'digs'. Error in islychrel>fix (line 20) digs = [mente,0]+[0,mod(digs,10)]; Error in islychrel>addReverse (line 14) digs = fix(d+fliplr(d)); Error in islychrel (line 4) d = addReverse(d) Error in Test11 (line 1) assert(islychrel(4852));

12   Fail
assert(islychrel(7491));

Unrecognized function or variable 'digs'. Error in islychrel>fix (line 20) digs = [mente,0]+[0,mod(digs,10)]; Error in islychrel>addReverse (line 14) digs = fix(d+fliplr(d)); Error in islychrel (line 4) d = addReverse(d) Error in Test12 (line 1) assert(islychrel(7491));

13   Fail
assert(~islychrel(5832));

Unrecognized function or variable 'digs'. Error in islychrel>fix (line 20) digs = [mente,0]+[0,mod(digs,10)]; Error in islychrel>addReverse (line 14) digs = fix(d+fliplr(d)); Error in islychrel (line 4) d = addReverse(d) Error in Test13 (line 1) assert(~islychrel(5832));

14   Fail
assert(~islychrel(7400));

Unrecognized function or variable 'digs'. Error in islychrel>fix (line 23) digs = digs(find(digs,1):end); Error in islychrel>addReverse (line 14) digs = fix(d+fliplr(d)); Error in islychrel (line 4) d = addReverse(d) Error in Test14 (line 1) assert(~islychrel(7400));

15   Fail
assert(~islychrel(2349));

Unrecognized function or variable 'digs'. Error in islychrel>fix (line 20) digs = [mente,0]+[0,mod(digs,10)]; Error in islychrel>addReverse (line 14) digs = fix(d+fliplr(d)); Error in islychrel (line 4) d = addReverse(d) Error in Test15 (line 1) assert(~islychrel(2349));

16   Fail
assert(~islychrel(7349));

Unrecognized function or variable 'digs'. Error in islychrel>fix (line 20) digs = [mente,0]+[0,mod(digs,10)]; Error in islychrel>addReverse (line 14) digs = fix(d+fliplr(d)); Error in islychrel (line 4) d = addReverse(d) Error in Test16 (line 1) assert(~islychrel(7349));

17   Fail
assert(~islychrel(9706));

Unrecognized function or variable 'digs'. Error in islychrel>fix (line 20) digs = [mente,0]+[0,mod(digs,10)]; Error in islychrel>addReverse (line 14) digs = fix(d+fliplr(d)); Error in islychrel (line 4) d = addReverse(d) Error in Test17 (line 1) assert(~islychrel(9706));

18   Fail
assert(~islychrel(8669));

Unrecognized function or variable 'digs'. Error in islychrel>fix (line 20) digs = [mente,0]+[0,mod(digs,10)]; Error in islychrel>addReverse (line 14) digs = fix(d+fliplr(d)); Error in islychrel (line 4) d = addReverse(d) Error in Test18 (line 1) assert(~islychrel(8669));

19   Fail
assert(~islychrel(863));

Unrecognized function or variable 'digs'. Error in islychrel>fix (line 20) digs = [mente,0]+[0,mod(digs,10)]; Error in islychrel>addReverse (line 14) digs = fix(d+fliplr(d)); Error in islychrel (line 4) d = addReverse(d) Error in Test19 (line 1) assert(~islychrel(863));

20   Fail
assert(~islychrel(5979));

Unrecognized function or variable 'digs'. Error in islychrel>fix (line 20) digs = [mente,0]+[0,mod(digs,10)]; Error in islychrel>addReverse (line 14) digs = fix(d+fliplr(d)); Error in islychrel (line 4) d = addReverse(d) Error in Test20 (line 1) assert(~islychrel(5979));

Suggested Problems

More from this Author56

Community Treasure Hunt

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

Start Hunting!