hanker

백준(3009) JAVA - 네 번째 점 본문

Study/ALGORITHM

백준(3009) JAVA - 네 번째 점

hanker 2021. 6. 29. 09:18
반응형
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int a = sc.nextInt();
        int b = sc.nextInt();

        int c = sc.nextInt();
        int d = sc.nextInt();

        int e = sc.nextInt();
        int f = sc.nextInt();

        int x = a;
        int y = b;

        if(x == c){
            x = e;
        } else if (x == e){
            x = c;
        }

        if(y == d){
            y = f;
        } else if(y == f){
            y = d;
        }

        System.out.println(x + " " + y);

    }

}
반응형