Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
33719 TheFirstGreen game C++ 通过 68 MS 256 KB 326 2023-12-31 10:49:22

Tests(10/10):


#include<iostream> using namespace std; bool sw(int x){ while(x>0){ if(x%10==7)return true; x/=10; } return false; } int main(){ int a,b,ans=0; cin>>a>>b; for(int i=a;i<=b;i++){ if(i%7==0||sw(i))ans++; } cout<<ans<<'\n'; while(a<=b){ if(a%7==0||sw(a))cout<<a<<'\n'; a++; } return 0; }


测评信息: