Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class SecretDoorsLock {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int a = Integer.parseInt(scanner.nextLine()),
- b = Integer.parseInt(scanner.nextLine()),
- c = Integer.parseInt(scanner.nextLine());
- for (int i = 2; i <= a; i++) {
- for (int j = 2; j <= b; j++) {
- for (int x = 2; x <= c; x++) {
- if (i % 2 == 0 && x % 2 == 0 && (j == 2 || j == 3 || j == 5 || j == 7)) {
- System.out.println(i + " " + j + " " + x);
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement