| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 74605 | 张志鹏 | 夏令营小旗手 | C++ | Wrong Answer | 0 | 0 MS | 248 KB | 373 | 2023-05-27 16:42:44 |
#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<<i<<endl; } cout<<ans; return 0; }