12978 - Palindrome Detection
|
Time |
Memory |
| Case 1 |
1 sec |
32 MB |
| Case 2 |
1 sec |
32 MB |
| Case 3 |
1 sec |
32 MB |
Description
- A palindrome a word such as “deed” or “level”, which is the same when you spell it backwards.
- Write a program that inputs a word (a sequence of lowercase letters) and determines whether or not the word is a palindrome. Each input word has at least 1 and at most 20 letters.
- Hint: By default, empty elements in character array contain “\0”.
Input
String of characters.
Output
"yes\n" or "no\n"
Tags