Advertisement
Dido09

SpecialNumbers

Jan 2nd, 2019
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class SpecialNumbers {
  4.  
  5. public static void main(String[] args) {
  6.  
  7. Scanner scan = new Scanner(System.in);
  8. int n = Integer.parseInt(scan.nextLine());
  9. for (int i = 1; i < 10; i++) {
  10. for(int j = 1; j < 10; j++){
  11. for(int k = 1; k < 10;k++){
  12. for(int l = 1;l < 10; l++){
  13. if(n % i == 0 && n % j == 0 && n % k == 0 && n % l == 0){
  14. System.out.print(i+""+j+""+k+""+l+" ");
  15. }
  16. }
  17. }
  18. }
  19. }
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement