| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 74580 | 桑迪 | 幸运数字 | C++ | Accepted | 100 | 15 MS | 252 KB | 282 | 2023-05-27 16:32:46 |
#include<bits/stdc++.h> using namespace std; int n,ans; bool ck(int k){ if(!(k%4)||!(k%7))return 1; while(k){ if((k%10==4||k%10==7)&&k%10==k/10%10)return 1; k/=10; }return 0; } int main(){ cin>>n; for(int i=1;i<=n;i++)if(ck(i))ans++; cout<<ans; return 0; }