Run ID Author Problem Lang Verdict Score Time Memory Code Length Submit Time
42117 徐睿杨 幸运数字 C++ Accepted 100 9 MS 252 KB 279 2022-06-24 12:12:42

Tests(5/5):


#include<bits/stdc++.h> using namespace std; int fact(int a){ if(a%7==0||a%4==0) return 1; while(a){ if(a%100==44||a%100==77) return 1; a/=10; } return 0; } int main(){ int a,b=0; cin>>a; for(int i=1;i<=a;i++){ b+=fact(i); } cout<<b; return 0; }


Judgement Protocol: