#K94892. Next Palindrome Number
Next Palindrome Number
Next Palindrome Number
Given an integer (N), your task is to compute the smallest palindrome number that is strictly greater than (N). A number is a palindrome if it remains the same when its digits are reversed. For instance, (121) is a palindrome, whereas (123) is not.
You are required to implement a solution that reads input from standard input (stdin) and outputs the result to standard output (stdout).
Examples:
If (N = 123), the next palindrome number is (131).
If (N = 9999), the next palindrome number is (10001>.
inputFormat
The input consists of a single integer (N) provided on a single line from standard input. (N) satisfies (0 \leq N \leq 10^6) (or within practical limits for the implementation).
outputFormat
Output a single integer representing the smallest palindrome number that is strictly greater than the given integer (N).## sample
123
131