1 条题解

  • 0
    @ 2023-9-23 13:53:27
    import java.util.Scanner;
    
    public class Main {
        public static void main(String[] args) {
            final Scanner scanner = new Scanner(System.in);
            final String in = scanner.nextLine();
            final int length = in.length();
            int j = length - 1;
            for (int i = 0; i < length; i++) {
                if (in.charAt(i) != in.charAt(j)) {
                    System.out.println("no");
                    return;
                }
                j--;
            }
            System.out.println("yes");
        }
    }
    
    • 1

    信息

    ID
    147
    时间
    1000ms
    内存
    128MiB
    难度
    5
    标签
    (无)
    递交数
    493
    已通过
    201
    上传者