あなたの状況を紹介します。なぜこの職務にふさわしいですか?https://vjudge.net/problem/UVA-10018回文の大体のテーマはこれと同じぐらいの数字の小さい改import java.util.Scanner;
public class RAA {
public static int reverse(int a) {
int rs = 0;
while (a > 0) {
rs *= 10;
rs += a % 10;
a /= 10;
}
return rs;
}
public static void main(String[] args) {
// TODO Auto-generated method stub
int n = 1, count;
int rev;
System.out.print(" :");
Scanner in = new Scanner(System.in);
int p = in.nextInt();
while(n>0) {
System.out.println(p);
rev = reverse(p);
p += rev;
count = 1;
rev = reverse(p);
n--;
while(p != rev) {
p += rev;
count++;
rev = reverse(p);
}
}
}
}
The「reverse and add」method is simp です。