| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 | 2048 MB | 28 | 11 | 10 | 37.037% |
You have a bar of chocolate which can be represented as a rectangle. Originally, the chocolate bar has a width of $N$ and a height of $M$. For this problem, denote $(n \times m)$ as a chocolate bar with a width of $n$ and a height of $m$.
You want to eat the chocolate with a total area of exactly $K$. However, you always eat a chocolate bar as a whole; that is, if you eat a chocolate bar $(n \times m),ドル then you will eat all the chocolate with area $n \cdot m$.
To be able to eat exactly $K$ total area, you are allowed to perform any of the following operations any number of times (possibly zero).
Determine the minimum number of operations such that it is possible to eat some chocolate bars with a total area of $K$.
Input consists of three integers $N$ $M$ $K$ (1ドル ≤ N, M ≤ 10^6$; 1ドル ≤ K ≤ N \cdot M$).
Output a single integer representing the minimum number of operations such that it is possible to eat some chocolate bars with a total area of $K$.
4 4 10
2
The following illustration shows one of the solutions to this sample. The chocolate bars that you eat are colored red.
5 6 6
1
1 1 1
0
ICPC > Regionals > Asia Pacific > Indonesia > Indonesia National Contest > INC 2023 M번