小唐唐 • 1天前
//#include
//#include<bits/stdc++.h>
using std::cout; using std::cin;
bool bu(int a){
int b;
do{
b=a%10;
if(b!=4&&b!=7){
return false;
}
a/=10;
}while(a);
return true;
} bool xingyun(int a){
bool time=false;
for(int i=4;;)
{
if(!bu(i)){
i++;
continue;
}if(a%i==0){
time=true;
break;
}
if(i>a) break;
i++;
}
return time;
} int main(void) {
int a;
cin>>a;
if(xingyun(a)) cout<<"YES";
else cout<<"NO";
return 0;
}
评论:
请先登录,才能进行评论