Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
45537 yuzhengxun 回文数 C++ 通过 0 MS 248 KB 342 2024-04-14 20:35:45

Tests(1/1):


#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; }


测评信息: