当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

6651:Final Exam

题目描述
Final Exam is coming! Cuber QQ has now one night to prepare for tomorrow's exam.

The exam will be a exam of problems sharing altogether $m$ points. Cuber QQ doesn't know about the exact distribution. Of course, different problems might have different points; in some extreme cases, some problems might worth $0$ points, or all $m$ points. Points must be integers; a problem cannot have $0.5$ point.

What he knows, is that, these $n$ problems will be about $n$ totally different topics. For example, one could be testing your understanding of Dynamic Programming, another might be about history of China in 19th century. So he has to divide your night to prepare each of these topics separately. Also, if one problem is worth $x$ points in tomorrow's exam, it takes at least $x+1$ hours to prepare everything you need for examination. If he spends less than $x+1$ hours preparing, he shall fail at this problem.

Cuber QQ's goal, strangely, is not to take as much points as possible, but to solve at least $k$ problems no matter how the examination paper looks like, to get away from his parents' scoldings. So he wonders how many hours at least he needs to achieve this goal.
输入解释
The first line of the input is an integer $t$ ($1 \le t \le 20~000$), denoting the number of test cases.

Each test case are three space-separated integers $n,m,k$ ($0 \le m \le 10^9$, $1 \le k \le n \le 10^9$).
输出解释
For each test case, output the number of hours Cuber QQ needs.
输入样例
2
1 10 1
10 109 10
输出样例
11
1100
提示
Cuber QQ should solve one problem in sample 1, so he at least prepares 11 hours when the problem one is 10 point. 
Cuber QQ should solve all the ten problems in sample 2, so he at least prepares 110 hours for each problem because there may be one problem is 109 point.
来自杭电HDUOJ的附加信息
Recommend chendu

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-6651

最后修改于 2020-10-25T23:33:10+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
4000/2000MS(Java/Others) 524288/524288K(Java/Others)