진짜 내머리 장식이얌?
def solution(sizes):
return max(max(x) for x in sizes) * max(min(x) for x in sizes)
리스트 축약식
solution = lambda sizes: max(sum(sizes, [])) * max(min(size) for size in sizes)
람다
def solution(sizes):
row = 0
col = 0
for a, b in sizes:
if a < b:
a, b = b, a
row = max(row, a)
col = max(col, b)
return row * col
a, b = b, a
def solution(sizes):
sizes = [sorted(s) for s in sizes]
return max([x[0] for x in sizes]) * max([x[1] for x in sizes])
sorted 쓰면 되지 참.. 와우