본문 바로가기

Programming [Python]/백준 알고리즘 솔루션

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

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

 

#Solution

리스트에 저장했다 빼는 루트로 해결한다.

dots = []
x = []
y = []

for _ in range(3):
    dots.append(list(map(int, input().split())))

for [a, b] in dots:
    if a in x:
        x.remove(a)
    else:
        x.append(a)
    
    if b in y:
        y.remove(b)
    else:
        y.append(b)

print(x[0], y[0])