返回列表 發帖
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. string str;
  4. int main()
  5. {
  6.     cin>>str;
  7.     int len=str.length();
  8.     for(int i=0; i<len/2; i++)
  9.         if(str[i]!=str[len-1-i])
  10.         {
  11.             cout<<"No"<<endl;
  12.             return 0;
  13.         }
  14.     cout<<"Yes"<<endl;
  15.     return 0;
  16. }
複製代碼

TOP

返回列表