#abc363d. D - Palindromic Number
D - Palindromic Number
Score : points
问题陈述
一个非负整数 如果其十进制表示(不包含前导零)是一个回文数,则称为回文数。 例如,、 和 都是回文数。
找出第 个最小的回文数。
以上为大语言模型 kimi 翻译,仅供参考。
Problem Statement
A non-negative integer is called a palindrome number if its decimal representation (without leading zeros) is a palindrome.
For example, , , and are all palindrome numbers.
Find the -th smallest palindrome number.
Constraints
- is an integer.
Input
The input is given from Standard Input in the following format:
Output
Print the -th smallest palindrome number.
Sample Input 1
46
Sample Output 1
363
The 46th smallest palindrome number is .
Sample Input 2
1
Sample Output 2
0
Sample Input 3
1000000000000000000
Sample Output 3
90000000000000000000000000000000009