#54725: c++解答


yp11451009@yphs.tp.edu.tw (711-19王敬皓)


c++

 

#include<bits/stdc++.h>
using namespace std;
int main(){
    string s;
    int n,chk=0;
    cin>>s;
    n=s.size();
    for(int i=0;i<n/2;i++){
        if(s[i]!=s[n-1-i]){
            cout<<"no\n";
            chk=1;
            break;
        }
    }
    if(chk==0) cout<<"yes\n";
}