Company: Walmart_1sept
Difficulty: medium
Fifth Nearest Palindrome Problem Description A State Government organizes a lottery competition every month and distributes uniquely numbered tickets for the same. At the time of result declaration, a random integer N is chosen by an automatic system. The person whose lottery ticket number X is the fifth nearest palindrome to N would be declared the winner of the lottery. Write a program to help the State Government find the winning ticket number X if you are given N. A palindrome is a number that remains the same when its digits are reversed eg. 484, 99, etc. Read the input from STDIN and print the output to STDOUT. Do not write arbitrary strings anywhere in the program, as these contribute to the standard output and test cases will fail. Input Format The input contains N, which is the random integer chosen by the automatic system. Output Format The output should contain the ticket number of the winner, X. Examples Example 1: Input: N = 45 Output: 22 Explanation: N = 45. The palindrom