Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class UniquePIN {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int n1 = Integer.parseInt(scanner.nextLine());
- int n2 = Integer.parseInt(scanner.nextLine());
- int n3 = Integer.parseInt(scanner.nextLine());
- boolean flag = false;
- for (int i = 2; i <= n1 ; i++) {
- for (int j = 2; j <= n2; j++) {
- flag= false;
- for (int m = 2; m <= j/2 ; m++) {
- if(j%m==0){
- flag=true;
- } }
- for (int k = 2; k <= n3; k++) {
- if ((i%2==0) && (!flag) && (k%2==0)){
- System.out.print("" + i + " " + j + " " + k);
- System.out.println();
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement