Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
45529 | yuzhengxun | 回文数 | C++ | Wrong Answer | 1 MS | 248 KB | 342 | 2024-04-14 20:30:57 |
#include<bits/stdc++.h> using namespace std; int h(int n){ int a=n,b=0; while(n){ b=b*10+n%10; n/=10; } return a==b; } int ch(int n){ while(n){ if(n&10==7) return 1; n/=10; } return 0; } int main() { int a,b,c=0; cin>>a>>b; for(int i=a;i<=b;i++){ if(h(i)&&ch(i)) c++; } cout<<c; return 0; }