Problem of the day
For Amount = 70, the minimum number of coins required is 2 i.e an Rs. 50 coin and a Rs. 20 coin.
It is always possible to find the minimum number of coins for the given amount. So, the answer will always exist.
The first line of input contains an integer 'T' representing the number of test cases or queries to be processed. Then the test case follows.
The only line of each test case contains a single integer ‘Amount’ representing the amount Dora wishes to change to Indian currency.
For each test case, print the minimum number of coins needed to make the change.
Print the output of each test case in a separate line.
You do not need to print anything, it has already been taken care of. Just implement the given function.
1 <= T <= 100
1 <= Amount <= 10^5
Where 'T' is the number of test-cases
Time Limit: 1sec
2
13
20
3
1
For the First Test Case ,the minimum number of coins to make the change are 3 {1, 2, 10}.
For the second Test Case, only one coin {20} is required.
2
50
96
1
5