完成回文数判定函数(ac)
2025-08-22 15:29:47
发布于:上海
0阅读
0回复
0点赞
#include<bits/stdc++.h>
using namespace std;
const int s=1e8+10;
void f(int z){
int t=0,x=z;
while(x>0){
t=t*10+x%10;
x/=10;
}if(t==z){
cout<<"Yes";
}else{
cout<<"No";
}
}
int main(){
int n;
cin>>n;
f(n);
return 0;
}
这里空空如也
有帮助,赞一个