tijie
2024-10-11 19:38:02
发布于:上海
0阅读
0回复
0点赞
#include <iostream>
using namespace std;
int main(){
int n;
cin>>n;
for (int i = 1; i <= n; ++i) {
int x = 0;
int s = i;
while(s>0){
x = x*10+s%10;
s = s/10;
}if(x==i){
cout<<i<<endl;
}
}
return 0;
}
这里空空如也
有帮助,赞一个