题解
2024-01-06 10:02:47
发布于:广东
12阅读
0回复
0点赞
#include <bits/stdc++.h>
using namespace std;
bool is_huiwen(int n){
int sum=0,t=n;
while(t){
int r=t%10;
sum=sum*10+r;
t/=10;
}
return sum==n;
}
int main(){
int n;
cin>>n;
if(is_huiwen(n)) cout<<"Yes";
else cout<<"No";
return 0;
}
这里空空如也
有帮助,赞一个