| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 74607 | 张志鹏 | 幸运数字 | C++ | Wrong Answer | 0 | 1 MS | 252 KB | 359 | 2023-05-27 16:43:17 |
#include<bits/stdc++.h> using namespace std; int n; int ans; int check(int x){ if(x%4==0) return 1; if(x%7==0) return 1; int k1=0,k2=0; while(x){ k2=k1; k1=x%10; if(k2==4&&k1==4) return 1; if(k2==7&&k1==7) return 1; x/=10; } } int main(){ cin>>n; for(int i=4;i<=n;i++){ if(check(i)) ans++; } cout<<ans; return 0; }