import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while (sc.hasNext()){ String s= sc.nextLine(); boolean c=true; int i=s.length() / 2 - 1; int j; if (s.length()%2==1) { j = s.length() / 2 + 1; for (; i >= 0 && j <= s.length() - 1; i--, j++) { if (s.charAt(i) != s.charAt(j)) { c = false; } else { c = true; } } }else { j = s.length() / 2 ; for (; i >= 0 && j <= s.length() - 1; i--, j++) { if (s.charAt(i) != s.charAt(j)) { c = false; } else { c = true; } } } if (c==true){ System.out.println("YES"); }else { System.out.println("NO"); } } } }
07-16
4395
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
03-20
3541
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-04
500
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)