Created
January 15, 2016 14:47
-
-
Save Jack-Saleem/2abc409373b1ad1b9265 to your computer and use it in GitHub Desktop.
Codeforces 122A LuckyDivision program in java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class LuckyDivision | |
{ | |
public static void main(String[] args) | |
{ | |
Scanner z=new Scanner(System.in); | |
int a=z.nextInt(); | |
int[] l={4,7,44,47,74,77,444,447,474,477,744,747,774,777}; | |
int ctr=0; | |
for(int ll:l) | |
{ | |
if(a%ll==0) | |
ctr++; | |
} | |
if(ctr>0) | |
System.out.println("YES"); | |
else | |
System.out.println("NO"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment