50分求助!!!
查看原帖
50分求助!!!
1116615
封禁用户楼主2023/12/17 20:34
#include<bits/stdc++.h>
using namespace std;
string s;
int l;
int main() {
	cin>>s;
	l=s.size();
	for(int i=0,j=l;i<=j;i++,j--)	
	{
	    if(s[i]!=s[j])
	    {
	        cout<<"no";
	        return 0;
	    }
	}
	cout<<"yes";
	return 0;
}
2023/12/17 20:34
加载中...