提交时间:2021-05-17 22:10:43

运行 ID: 19621

#include <bits/stdc++.h> using namespace std; bool check(int a) { if(a%4==0||a%7==0)return true; while(a) { if(a%100==44||a%100==77)return true; a/=10; } return false; } int main() { int n,s=0; cin>>n; for(int i=1; i<=n; i++)if(check(i))s++; cout<<s<<endl; }