Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- public class Solution {
- static String spr(String a) {
- int n = a.length();
- for (int i = 0; i < n/2; ++i) {
- if (a.charAt(i) != a.charAt(n-1-i))
- return "No";
- }
- return "Yes";
- }
- public static void main(String[] args) {
- Scanner sc = new Scanner(System.in);
- String s = sc.next();
- System.out.println(spr(s));
- sc.close();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement