CF996A.Hit the Lottery
入门
通过率:0%
时间限制:1.00s
内存限制:256MB
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
Allen has a LOT of money. He has n dollars in the bank. For security reasons, he wants to withdraw it in cash (we will not disclose the reasons here). The denominations for dollar bills are 1, 5, 10, 20, 100. What is the minimum number of bills Allen could receive after withdrawing his entire balance?
艾伦有大量的钱。他在银行里有 n 美元。出于安全原因,他希望将这笔钱全部以现金形式取出(此处不透露具体原因)。美元纸币的面额为 1、5、10、20、100。艾伦在取款后,最少能收到多少张纸币?
输入格式
The first and only line of input contains a single integer n (1≤n≤109).
输入仅有一行,包含一个整数 n(1≤n≤109)。
输出格式
Output the minimum number of bills that Allen could receive.
输出艾伦可能收到的最少纸币数量。
输入输出样例
输入#1
125
输出#1
3
输入#2
43
输出#2
5
输入#3
1000000000
输出#3
10000000
说明/提示
In the first sample case, Allen can withdraw this with a 100 dollar bill, a 20 dollar bill, and a 5 dollar bill. There is no way for Allen to receive 125 dollars in one or two bills.
In the second sample case, Allen can withdraw two 20 dollar bills and three 1 dollar bills.
In the third sample case, Allen can withdraw 100000000 (ten million!) 100 dollar bills.
在第一个样例中,Allen 可以用一张 100 美元纸币、一张 20 美元纸币和一张 5 美元纸币取款。Allen 无法仅用一张或两张纸币取出 125 美元。
在第二个样例中,Allen 可以取两张 20 美元纸币和三张 1 美元纸币。
在第三个样例中,Allen 可以取 100000000(一千万!)张 100 美元纸币。
输入解题思路,AI测评打分。不知道怎么写?