【题目描述】
【输入】
【输出】
【输入样例】
abcdedcba
【输出样例】
#include<iostream> #include<cstdio> #include<cstring> using namespace std; char st[105]; int n,p,flag=1; int main(){ cin>>st; n=strlen(st); p=n/2; for(int i=0;i<p;++i)if(st[i]!=st[n-i-1])flag=0; if(flag)cout<<"yes"; else cout<<"no"; return 0; }//OK
Powered by 孙会中 @ 2024-2026【 www.sunhuizhong.cn 】All rights reserved
访问统计:387660 本月:27 上月:1061 今日:6 昨日:3 当前在线:1人