본문 바로가기
알고리즘/프로그래머스

프로그래스머스-최소 직사각형-python

by nyeongha 2023. 11. 23.

프로래그래스머스 최소 직사각형-python

def solution(sizes):

    for i in sizes:
        i.sort()
    wl=[]
    hl=[]
    for w,h in sizes:
        wl.append(w)
        hl.append(h)
    mwl=max(wl)
    mhl=max(hl)

    answer = mwl*mhl
    return answer