honey_pot

[python] 백준 3009번 본문

카테고리 없음

[python] 백준 3009번

_tera_ 2021. 6. 6. 20:48

import sys

x1, y1 = map(int, sys.stdin.readline().split())
x2, y2 = map(int, sys.stdin.readline().split())
x3, y3 = map(int, sys.stdin.readline().split())

if y2 == y3:
    y4 = y1
elif y1 == y2:
    y4 = y3
elif y3 == y1:
    y4 = y2

if x3 == x2:
    x4 = x1
elif x3 == x1:
    x4 = x2
elif x1 == x2:
    x4 = x3
print(x4, y4)

x, y 그림 그리면서 썼는데도 if 조건문 틀려서 y4가 정의되지 않았다고 3번이나 떴다^^ 대충 살지 말자

Comments