| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 41826 | 曹张煜 | 幸运数字 | C++ | Accepted | 100 | 9 MS | 248 KB | 286 | 2022-06-18 15:14:02 |
#include<bits/stdc++.h> using namespace std; int fact(int n){ if(n%4==0||n%7==0) return 1; while(n){ if(n%100==44||n%100==77) return 1; n/=10; } return 0; } int main(){ int n,sum=0; cin>>n; for(int i=1;i<=n;i++){ sum+=fact(i); } cout<<sum; return 0; }