Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
104660 | 杨登博 | 输出回文数 | C++ | Accepted | 35 MS | 272 KB | 432 | 2025-01-06 20:13:22 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() using namespace std; int main(){ int n,a,i,s=0; cin>>n; for(int i=1;i<=n;i++){ a=i; s=0; while(a!=0){ s=s*10+a%10; a=a/10; } if(i==s){ cout<<i<<endl; } } return 0; }