Palindromic addition

Input is denoted by a list of integers P.

  • Your task is to find the largest palindromic number that can be made by adding (NOT CONCATENATING) the numbers in the given array.

Example Case

Input: P = [12, 21, 33, 45]
Output: 111
Explanation: 12 + 21 + 33 + 45 = 111

Case 1

Input: P = [13, 24, 37, 48, 59, 61, 72, 84, 95, 106, 117, 128, 139, 150, 161, 173, 184, 195, 207, 218, 229, 240, 251, 262, 273, 284, 295, 307, 318, 329, 340, 351, 362, 373, 384, 395, 407, 418, 429, 440, 451, 462, 473, 484, 495, 506, 517, 528, 539, 550]


Case 2

The input is too long! Access it here.


Submit Here