| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 46092 | liusiyu | 回文数 | C++ | Wrong Answer | 0 MS | 240 KB | 423 | 2024-04-24 21:01:00 |
#include<bits/stdc++.h> using namespace std; bool pd(int x){ int l,p=x; while(p!=0){ l+=p%10; p/=10; } if(l==x) return 1; return 0; } bool pdd(int c){ int b=c; while(b!=0){ if(b%10==7) return 1; else b/=10; } return 0; } int main() { int n,m,cnt=0; cin>>n>>m; for(int i=n;i<=m;i++){ if(pdd(i)==1&&pd(i)==1){ cnt++; cout<<i<<" "; } } cout<<cnt; return 0; }