| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 42056 | Songgr | 九进制回文数 | C++ | Runtime Error | 0 MS | 232 KB | 439 | 2024-02-24 09:51:17 |
//九进制回文数 #include<bits/stdc++.h> using namespace std; int main() { int jz=0,cnt=0; int n,m; cin>>n>>m; for(int i=n;i<=m;i++){ int x=i; int a9=0,b9=0,pos=1; bool flag=true; while(x){ if(x%jz%2==0){ flag=false; break; } a9=a9*10+x%jz;//1 b9=b9+x%jz*pos;//1 pos=pos+pos*10; x/=jz;//10 } if(a9==b9&&flag){ cnt++; } } cout<<cnt; return 0; }