Cody

Problem 45. Make a Palindrome Number

Solution 734717

Submitted on 14 Sep 2015 by toofan
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))

c = 124 g = 421 e = 545 c = 545 g = 545 b = 545 b = 545

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

c = 150 g = 051 e = 201 c = 201 g = 102 e = 303 c = 303 g = 303 b = 303 b = 303 b = 303

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

c = 291 g = 192 e = 483 c = 483 g = 384 e = 867 c = 867 g = 768 e = 1635 c = 1635 g = 5361 e = 6996 c = 6996 g = 6996 b = 6996 b = 6996 b = 6996 b = 6996 b = 6996

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

c = 178 g = 871 e = 1049 c = 1049 g = 9401 e = 10450 c = 10450 g = 05401 e = 15851 c = 15851 g = 15851 b = 15851 b = 15851 b = 15851 b = 15851

Suggested Problems

More from this Author95

Community Treasure Hunt

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

Start Hunting!