-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1259.java
More file actions
25 lines (23 loc) · 790 Bytes
/
1259.java
File metadata and controls
25 lines (23 loc) · 790 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception{
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String line = reader.readLine();
StringBuilder result = new StringBuilder();
int i, len;
while(line.compareTo("0") != 0){
for(i = 0, len = line.length(); i < len; i++){
if(line.charAt(i) != line.charAt(len-1-i)){
result.append("no\n");
break;
}
}
if(i == len){
result.append("yes\n");
}
line = reader.readLine();
}
System.out.print(result.toString());
}
}