Skip to content

Piece of cake

1. Problem

해당 문제는 여기에서 확인하실 수 있습니다.

2. Answer

n, h, v = map(int, input().split())

# 세로 방향(위/아래 중 더 큰 높이)
width  = max(h, n - h)
# 가로 방향(좌/우 중 더 큰 폭)
height = max(v, n - v)

volume = width * height * 4
print(volume)