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