728x90
큰값(가로)의 최댓값 * 작은값(세로)의 최댓값
def solution(sizes):
return max(max(x) for x in sizes) * max(min(x) for x in sizes)
[[60, 50], [30, 70], [60, 30], [80, 40]]
[60, 50]
[30, 70]
[60, 30]
[80, 40]
max([60, 70, 60, 80]) * max(50, 30, 30, 40))
80 * 50 = 4000
def solution(sizes):
return max(sum(sizes, [])) * max(min(size) for size in sizes)
[[60, 50], [30, 70], [60, 30], [80, 40]]
[60, 50, 30, 70, 60, 30, 80, 40]
[60, 50]
[30, 70]
[60, 30]
[80, 40]
80 * 50 = 4000
728x90