高质量题解
2026-01-20 10:38:47
发布于:北京
1阅读
0回复
0点赞
#include <bits/stdc++.h>
using namespace std;
bool c(int x){
int x1=x;
int ans=0;
while(x){
ans=ans*10+x%10;
x/=10;
}
if(ans==x1){
return true;
}
else{
return false;
}
}
int main(){
int n;
cin>>n;
if(c(n)){
cout<<"yes";
}
else{
cout<<"no";
}
return 0;
}
这里空空如也







有帮助,赞一个