1165. Palindrome Problem

单点时限: 2.0 sec

内存限制: 256 MB

A palindrome is a word or phrase which is spelled the same backwards and forwards(ignoring any punctuation and whitespace).Some famous palindromes include

Madam,I’m Adam

A man,a plan,a canal:Panama!

Go hang a salami,I’m a lasagna hog.

For this problem,you will read in a string of text and determine whether or not it is a palindrome.

输入格式

There will be multiple input sets.Each set will consist of one line of text of no more than 80 characters.

The last line of the file will contain the sentence THE END. and should not be processed.

输出格式

For each input set,output either the word Yes or the word No depending on whether the input string is a palindrome or not.

样例

Input
Go hang a salami,I'm a lasagna hog.
East Central Regional Programming Contest
Dennis sinned
THE END.
Output
Yes
No
Yes

8 人解决,65 人已尝试。

8 份提交通过,共有 116 份提交。

8.6 EMB 奖励。

创建: 17 年,6 月前.

修改: 7 年,2 月前.

最后提交: 2 年,8 月前.

来源: partychen

题目标签