AC
2025-11-12 19:51:10
发布于:北京
14阅读
0回复
0点赞
#include<iostream>
using namespace std;
bool is_pal(int n){
int x=0,p=n;
while(p!=0){
x=x*10+p%10;
p=p/10;
}
if(x==n){
return true;
}else{
return false;
}
}
int main() {
int n;
cin >> n;
if(is_pal(n)) cout << "Yes" << endl;
else cout << "No" << endl;
return 0;
}
这里空空如也







有帮助,赞一个