Cody

Solution 1779557

Submitted on 9 Apr 2019 by Yingao Zhang
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
a = 124; b = 545; assert(isequal(find_palindrome(a),b))

xstr = '124' rev_xstr = '421' rev_x = 421 xstr = '124' rev_xstr = '421' rev_x = 421 a = 545 xstr = '545' rev_xstr = '545' rev_x = 545 b = 545

2   Pass
a = 150; b = 303; assert(isequal(find_palindrome(a),b))

xstr = '150' rev_xstr = '051' rev_x = 51 xstr = '150' rev_xstr = '051' rev_x = 51 a = 201 xstr = '201' rev_xstr = '102' rev_x = 102 xstr = '201' rev_xstr = '102' rev_x = 102 a = 303 xstr = '303' rev_xstr = '303' rev_x = 303 b = 303

3   Pass
a = 291; b = 6996; assert(isequal(find_palindrome(a),b))

xstr = '291' rev_xstr = '192' rev_x = 192 xstr = '291' rev_xstr = '192' rev_x = 192 a = 483 xstr = '483' rev_xstr = '384' rev_x = 384 xstr = '483' rev_xstr = '384' rev_x = 384 a = 867 xstr = '867' rev_xstr = '768' rev_x = 768 xstr = '867' rev_xstr = '768' rev_x = 768 a = 1635 xstr = '1635' rev_xstr = '5361' rev_x = 5361 xstr = '1635' rev_xstr = '5361' rev_x = 5361 a = 6996 xstr = '6996' rev_xstr = '6996' rev_x = 6996 b = 6996

4   Pass
a = 178; b = 15851; assert(isequal(find_palindrome(a),b))

xstr = '178' rev_xstr = '871' rev_x = 871 xstr = '178' rev_xstr = '871' rev_x = 871 a = 1049 xstr = '1049' rev_xstr = '9401' rev_x = 9401 xstr = '1049' rev_xstr = '9401' rev_x = 9401 a = 10450 xstr = '10450' rev_xstr = '05401' rev_x = 5401 xstr = '10450' rev_xstr = '05401' rev_x = 5401 a = 15851 xstr = '15851' rev_xstr = '15851' rev_x = 15851 b = 15851

More from this Author95