작성
·
215
0
package matter7;
import java.util.Iterator;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String str = sc.next().toUpperCase();
Main main = new Main();
System.out.println(main.solution(str));
}
public String solution(String str) {
String answer ="";
char [] s = str.toCharArray();
int len = str.length();
for(int i = 0 ; i < len/2 ; i++) {
if(s[i] == s[len-i-1]) {
answer = "YES";
}else {
answer = "NO";
}
}
return answer;
}
}