Created
September 13, 2022 21:33
-
-
Save modos/d13226512a099259ffd2b5bbfb157f1a to your computer and use it in GitHub Desktop.
دوربین مداربسته
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) { | |
Scanner scanner = new Scanner(System.in); | |
long x1 = scanner.nextInt(); | |
long y1 = scanner.nextInt(); | |
long x2 = scanner.nextInt(); | |
long y2 = scanner.nextInt(); | |
long x3 = scanner.nextInt(); | |
long y3 = scanner.nextInt(); | |
long x4 = 0; | |
long y4 = 0; | |
if(x1 == x2) | |
x4 = x3; | |
else if(x1 == x3) | |
x4 = x2; | |
else | |
x4 = x1; | |
//missing y | |
if(y1 == y2) | |
y4 = y3; | |
else if(y1 == y3) | |
y4 = y2; | |
else | |
y4 = y1; | |
System.out.print(x4 + " " + y4); | |
scanner.close(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment