코드

# 직사각형 나머지 꼭짓점 구하기
x1, y1 = map(int, input().split())
x2, y2 = map(int, input().split())
x3, y3 = map(int, input().split())

def _s(x1, y1, x2, y2, x3, y3):
    
    x_list = [x1, x2, x3]
    y_list = [y1, y2, y3]
    
    x_max = max(x_list)
    y_max = max(y_list)
    
    x_min = min(x_list)
    y_min = min(y_list)
    
    if (x_list.count(x_max) == 2):
        x4 = x_min
    else:
        x4 = x_max
        
    if (y_list.count(y_max) == 2):
        y4 = y_min
    else:
        y4 = y_max
    
    
    print(x4, y4)
    
_s(x1, y1, x2, y2, x3, y3)

댓글남기기