AC
2023-07-24 17:57:52
发布于:广东
7阅读
0回复
0点赞
#include<bits/stdc++.h>
using namespace std;
bool is_pal(int x){
string s = to_string(x);
string rev_s = s;
reverse(s.begin(),s.end());
return rev_s == s;
}
int main() {
int n;
cin >> n;
if(is_pal(n)) cout << "Yes" << endl;
else cout << "No" << endl;
return 0;
}
这里空空如也
有帮助,赞一个