(RankList for this Question)
What is the most efficient way for Abhishek to obtain a specified amount of money, 'n' dollars, using a combination of 1, 5, 10, 20, and 100 dollar bills, with the goal of receiving the fewest possible bills?
Constraints
Input Format
The first and only line of input contains a single integer `n`
Output Format
Output the minimum number of bills that Abhishek could receive.
Example 1
Input:
125
Output:
3
Explanation:
In the first sample case, Abhishek 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.
Example 2
Input:
74
Output:
8
Explanation:
In this sample case, Abhishek's can withdraw this with 3 times 20 dollar bill, a 10 dollar bill and 4 times a 1 dollar bill.So the ans is 3+1+4= 8.
Log In to solve the Question