| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 20019 | 桑迪 | 幸运数字 | C++ | Accepted | 100 | 9 MS | 252 KB | 297 | 2021-05-27 22:03:39 |
#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; }