Palindromes _ easy version
Palindromes _ easy versionTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission (s): 22866 Accepted Submission (s): 14213
Problem Description "文" is a string with the same positive and reverse reads. For example, "level" or "noon" is a 文 string. Write a program to check whether the read string is a "reply ".
The Input contains multiple test instances. The first line of Input data is a positive integer n, indicating the number of test instances, followed by n strings.
Output: If a string is a return string, "yes" is Output; otherwise, "no" is Output ".
Sample Input
4levelabcdenoonhaha
Sample Output
Yesnoyesno source code: # include
# Include
# Include
Int main () {int n, I, flag, len; char str [100]; scanf ("% d", & n); getchar (); while (n --) {flag = 1; gets (str); len = strlen (str); for (I = 0; I