| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 42155 | 肖开 | 幸运数字 | C++ | Time Limit Exceeded | 0 | 1000 MS | 244 KB | 292 | 2022-06-24 16:16:00 |
#include<bits/stdc++.h> using namespace std; int lucky(int n){ if(n%4==0||n%7==0) return 1; while(n){ if(n%100==44||n%100==77){ return 1; } } return 0; } int main(){ int x=0,n,j; cin>>n; for(int i=1;i<=n;i++){ j=i; x+=lucky(j); } cout<<x; return 0; }