김두두의 블로그

[파이썬] 백준 3009번 네 번째 점 본문

it

[파이썬] 백준 3009번 네 번째 점

두두100 2022. 3. 24. 23:51

https://www.acmicpc.net/problem/3009

 

3009번: 네 번째 점

세 점이 주어졌을 때, 축에 평행한 직사각형을 만들기 위해서 필요한 네 번째 점을 찾는 프로그램을 작성하시오.

www.acmicpc.net

a,b=map(int,input().split())
c,d=map(int,input().split())
e,f=map(int,input().split())
p=0
k=0
if a!=c:
    if a==e:
        p=c
    else:
        p=a
else:
    p=e
if b!=d:
    if b==f:
        k=d
    else:
        k=b
else:
    k=f
print(p,k)