| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 42376 | 老方 | 找出1~N范围内的所有回文数字 | C++ | Accepted | 1 MS | 248 KB | 288 | 2024-02-26 10:10:19 |
#include<bits/stdc++.h> using namespace std; bool ish(int n){ string str=to_string(n); for(int i=0;i<str.size();i++){ if(str[i]!=str[str.size()-1-i])return false; } return true; } int main(){ int n; cin>>n; for(int i=1;i<=n;i++)if(ish(i))cout<<i<<endl; return 0; }