| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 0.1 초 | 1024 MB | 139 | 56 | 51 | 51.000% |
Martín has a board of 1ドル \times N$ squares. He also has $N$ tiles of 1ドル \times 1, 1 \times 2, \dots , 1 \times N$ squares, one of each type. He has placed one of the tiles on the board. His friend, Nico, wants to place some of the remaining tiles in such a way that as many squares as possible are covered. How many squares will remain empty if he succeeds?
Tiles placed on the board cannot overlap each other. Besides, each placed tile must be located completely within the board and must cover whole squares.
The input consists of a single line that contains three integers $N$ (1ドル ≤ N ≤ 1000$), $K$ (1ドル ≤ K ≤ N$) and $E$ (0ドル ≤ E ≤ N - K$), indicating that the board has 1ドル \times N$ squares, and a tile of 1ドル \times K$ squares is placed leaving $E$ empty squares to its left.
Output a single line with an integer indicating the number of squares that will remain empty if Nico covers as many squares as possible with the remaining tiles.
6 2 2
3
1000 1 1
1