题解
2023-07-07 11:31:43
发布于:上海
96阅读
0回复
0点赞
#include<iostream>
using namespace std;
bool is_pal(int a){
int x=0,y=a;
while(y!=0){
x=x*10+y%10;
y=y/10;
}
if(x==a){
return true;
}else{
return false;
}
}
int main() {
int n;
cin >> n;
if(is_pal(n)) cout << "Yes" << endl;
else cout << "No" << endl;
return 0;
}
这里空空如也
有帮助,赞一个