http:// http://noi.openjudge.cn/ch0107/33/
"""
1.7 编程基础之字符串 33 判断字符串是否为回文
http://noi.openjudge.cn/ch0107/33/
python判断输入字符串是否为回文
https://blog.csdn.net/happyuu/article/details/80731871
Python案例:四种方法判断回文字符串
https://howard2005.blog.csdn.net/article/details/108921500
"""
s = input("")
rs = list(reversed(s))
if list(s) == rs:
print("yes")
else:
print("no")
C++代码:
/*
1.7编程基础之字符串_33判断字符串是否为回文07
http://noi.openjudge.cn/ch0107/33/
*/
#include<iostream>
using namespace std;
int main()
{
string a;
cin>>a;
int k = a.length() ,b = k-1;
for( int i = 0; i < k; i++)
{
if(a[b] != a[i])
{
cout<<"no";
return 0;
}
b--;
}
cout<<"yes";
return 0;
}