SHARE
TWEET

codeforce - Lucky Division

jakaria_hossain May 19th, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <bits/stdc++.h>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int n,i,a[10]={4,7,47,74,447,474,477,774,747,744},cnt=0;
  8.     scanf("%d",&n);
  9.     for(i=0;i<10;i++){
  10.     if(n==a[i]||n%a[i]==0){
  11.         printf("YES\n");
  12.         return 0;
  13.     }
  14.     }
  15.     printf("NO\n");
  16.     return 0;
  17. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top