首先,这里是问题所在:
如果从左到右和从右到左读取的正整数在十进制系统中的表示相同,则称为回文。对于给定的不超过1000000位数的正整数K,将大于K的最小回文值写入输出。数字始终显示时不带前导零。
输入:第一行包含整数t,即测试用例的数量。在接下来的t行中给出整数K。
输出:对于每个K,输出大于K的最小回文。
输入:
2
808
2133
输出:
818
2222
其次,这是我的代码:
// I know it is bad practice to not cater for erroneous input,
// however for the purpose of the execise it is omitted
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.lang.Exception;
import java.math.BigInteger;
public class Main
{
public static void main(String [] args){
try{
Main instance = new Main(); // create an instance to access non-static
// variables
// Use java.uti