提交时间:2021-05-27 20:16:20

运行 ID: 19974

#include<iostream> #include<cstdio> using namespace std; int check(int x) { if(x%4==0||x%7==0)return 1; while(x){ if(x%100==44||x%100==77)return 1; x/=10; } return 0; }int main() { int n,i,ans=0; cin>>n; for(i=1;i<=n;++i) if(check(i))ans++; cout<<ans; return 0; }