返回列表 發帖
  1. #include<bits/stdc++.h>
  2. using namespace std;

  3. int main()
  4. {
  5.     string str;
  6.     cin>>str;
  7.     int len=str.length();
  8.     for(int i=0;i<len/2;i++ ){
  9.         if(str[i]!=str[len-i-1]){
  10.             cout<<"No"<<endl;
  11.             return 0;
  12.         }
  13.     }
  14.     cout<<"Yes"<<endl;
  15.     return 0;
  16. }
複製代碼

TOP

返回列表