#abc206b. B - Savings
B - Savings
Score : points
问题描述
AtCoDeer 有一个空的存钱罐。
在第 天早晨,他会放入 日元(日本货币):在第 天早晨放入 日元,在第 天早晨放入 日元,依此类推。
每天晚上,他都会检查存钱罐中的金额。
在第几天他会首次发现存钱罐中有 日元或更多?
以上为通义千问 qwen-max 翻译,仅供参考。
Problem Statement
AtCoDeer has an empty piggy bank.
On the morning of the -th day, he will put yen (Japanese currency) in it: yen on the morning of the -st day, yen on the morning of the -nd day, and so on.
Each night, he will check the amount of money in it.
On which day will he find out that his piggy bank has yen or more for the first time?
Constraints
- is an integer.
Input
Input is given from Standard Input in the following format:
Output
Print an integer such that AtCoDeer will find out that his piggy bank has yen or more for the first time on the -th day.
Sample Input 1
12
Sample Output 1
5
- On the -st day, the piggy bank gets yen in the morning and has yen at night.
- On the -st day, the piggy bank gets yen in the morning and has yen at night.
- On the -rd day, the piggy bank gets yen in the morning and has yen at night.
- On the -th day, the piggy bank gets yen in the morning and has yen at night.
- On the -th day, the piggy bank gets yen in the morning and has yen at night.
Thus, on the -th night, AtCoDeer will find out that his piggy bank has yen or more for the first time.
Sample Input 2
100128
Sample Output 2
447
update @ 2024/3/10 09:19:14