#38286: C++答案


yp11251200@yphs.tp.edu.tw (701-26徐立權)

學校 : 臺北市私立延平高級中學
編號 : 239171
來源 : [203.72.178.1]
最後登入時間 :
2024-03-14 17:17:45
a022. 迴文 | From: [203.72.178.1] | 發表日期 : 2023-11-09 16:58

#include <bits/stdc++.h>
using namespace std;
int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    string s;
    cin >> s;
    string t = s;
    reverse(s.begin(), s.end());
    if(s == t) cout << "yes\n";
    else cout << "no\n";
}

 
ZeroJudge Forum