import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
int n = sc.nextInt();
String temp = "";
for (int i = 0; i < n; i++) {
String str = sc.next();
for (int j = str.length() - 1; j >= 0; j--) {
temp += str.charAt(j);
}
if (temp.equalsIgnoreCase(str)) {
System.out.println("yes");
temp = "";
} else {
System.out.println("no");
temp = "";
}
}
}
}
}
杭电 2029 ( Palindromes _easy version ) java
最新推荐文章于 2020-10-24 15:35:47 发布