Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
23712 U•ェ•*✔ game C++ 通过 75 MS 252 KB 352 2023-07-16 15:34:22

Tests(10/10):


#include"bits/stdc++.h" using namespace std; bool check(int x){ while(x){ if(x%10==7) return 1; x/=10; } return 0; } int main(){ long long a,b,ans=0; cin>>a>>b; for(int i=a;i<=b;i++){ int s=i; if(i%7==0||check(s))ans++; } cout<<ans<<'\n'; for(int i=a;i<=b;i++){ int s=i; if(i%7==0||check(s))cout<<i<<'\n'; } }


测评信息: