[Solution] Minimum Coins CodeChef Solution
There are only type of denominations in Chefland:
- Coins worth rupee each
- Notes worth rupees each
Chef wants to pay his friend exactly rupees. What is the minimum number of coins Chef needs to pay exactly rupees?
Input Format
- The first line of input will contain a single integer , denoting the number of test cases.
👇👇👇👇👇
- Each test case consists of a single line of input containing a single integer .
Output Format
For each test case, output on a new line the minimum number of coins Chef needs to pay exactly rupees.
No comments:
Post a Comment