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

建议使用的浏览器:

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

3139:Soda Surpler

题目描述


Tim is an absolutely obsessive soda drinker, he simply cannot get enough. Most annoyingly though, he almost never has any money, so his only obvious legal way to obtain more soda is to take the money he gets when he recycles empty soda bottles to buy new ones. In addition to the empty bottles resulting from his own consumption he sometimes find empty bottles in the street. One day he was extra thirsty, so he actually drank sodas until he couldn't afford a new one.
输入解释
Three non-negative integers e, f, c, where e < 1000 equals the number of empty soda bottles in Tim's possession at the start of the day, f < 1000 the number of empty soda bottles found during the day, and 1 < c < 2000 the number of empty bottles required to buy a new soda.
输出解释
How many sodas did Tim drink on his extra thirsty day?
输入样例
9 0 3
5 5 2
输出样例
4
9
来自杭电HDUOJ的附加信息
Recommend chenrui

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

题目来源 NCPC 2009

源链接: HDU-3139

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

共提交 0

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