Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class SpecialNumbers {
- public static void main(String[] args) {
- Scanner scan = new Scanner(System.in);
- int n = Integer.parseInt(scan.nextLine());
- for (int i = 1; i < 10; i++) {
- for(int j = 1; j < 10; j++){
- for(int k = 1; k < 10;k++){
- for(int l = 1;l < 10; l++){
- if(n % i == 0 && n % j == 0 && n % k == 0 && n % l == 0){
- System.out.print(i+""+j+""+k+""+l+" ");
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement