Skip to content

Instantly share code, notes, and snippets.

@dalcon10028
Created December 29, 2019 09:02
Show Gist options
  • Save dalcon10028/dea1987dec60a2fe3b2d7ff51cc43fb5 to your computer and use it in GitHub Desktop.
Save dalcon10028/dea1987dec60a2fe3b2d7ff51cc43fb5 to your computer and use it in GitHub Desktop.
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int [][]a = new int[3][2];
for(int i=0; i<a.length; i++)
for(int j=0; j<a[0].length; j++)
a[i][j] = sc.nextInt();
if (a[0][0] == a[1][0]) { // 30 == 10
System.out.print(a[2][0] + " ");
} else if(a[0][0] == a[2][0]) { // 30 ==10
System.out.print(a[1][0] + " ");
}else{ //30 x
System.out.print(a[0][0] + " ");
}
if (a[0][1] == a[1][1]) {
System.out.print(a[2][1]);
} else if(a[0][1] == a[2][1]) {
System.out.print(a[1][1]);
}else{
System.out.print(a[0][1]);
}
sc.close();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment