内存限制:256 MB
时间限制:1 S
题面:Markdown
评测方式:文本比较
上传者:
提交:9
通过:3
On a mysterious planet, YangQiShaoNian and Keith must fight a terrifying monster.
Now, several war machines need to be built to combat the monster. The monster starts with a health of $h$, and it will die when its health falls to $0$ or below.
Each machine has two functions —"Fight" and "Create"— described as follows:
**Fight:** For a given machine, using the "Fight" function will reduce the monster's health by $1$, but the machine will be permanently damaged and lose all functionality;
**Create:** To use the "Create" function, first, $m$ machines must be chosen, and this function must be used on them simultaneously, which will then produce $k$ new machines. Note that each machine can only use the "Create" function once, but can still use the "Fight" function afterwards.
Please calculate the minimum number of initial war machines required to defeat the monster.
For each test case:
Output only one line containing an integer, representing the answer.