PALIN - The Next Palindrome
题意翻译
给定n个数字,求第一个大于该数字的回文数字。
每个数字的位数<=1000000。
Translated by @稀神探女
题目描述
A positive integer is called a _palindrome_ if its representation in the decimal system is the same when read from left to right and from right to left. For a given positive integer _K_ of not more than 1000000 digits, write the value of the smallest palindrome larger than _K_ to output. Numbers are always displayed without leading zeros.
输入输出格式
输入格式
The first line contains integer _t_, the number of test cases. Integers _K_ are given in the next _t_ lines.
输出格式
For each _K_, output the smallest palindrome larger than _K_.
输入输出样例
输入样例 #1
2
808
2133
输出样例 #1
818
2222
说明
**Warning: large Input/Output data, be careful with certain languages**