#P1609. 最小回文数
最小回文数
Description
A palindromic number is a number that reads the same from left to right and from right to left.
For example: , , and are palindromic numbers, while and are not.
Given a number , find a palindromic number such that .
There are many such palindromic numbers; your task is to output the smallest one.
Input Format
One line containing a positive integer . The value of is less than , and has no leading .
Output Format
Your program should output one line: the smallest palindromic number with .
44
55
Hint
For of the testdata, .
For of the testdata, .
Translated by ChatGPT 5
京公网安备 11011102002149号