73 判断一个数是否是回文数
Table of Contents

ac

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;


public class Main {
    public static Scanner sc = new Scanner(System.in);

    public static BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

    public static void main(String[] args) throws Exception {
        int n = sc.nextInt();
        int n1 = Math.abs(n);
        int n2 = n1;

        int help = 1;
        while (n1 > 10){
            n1 /= 10;
            help *= 10;
        }
        while (n2 > 0){
            int left = n2 / help;
            int right =  n2 % 10;
            if(left != right){
                System.out.println("No");
                return;
            }
            //System.out.println(left + "-" + right);
            n2 = n2 % help;
            n2 /= 10;
            help /= 100;
        }
        System.out.println("Yes");
    }
}