Codechef•Sep 10, 2025
Minimum Coins
Hazrat Ali
Codechef
Chef wants to pay his friend exactly X rupees. What is the minimum number of coins Chef needs to pay exactly X rupees?
Input Format
- The first line of input will contain a single integer T, denoting the number of test cases.
- Each test case consists of a single line of input containing a single integer X.
Output Format
For each test case, output on a new line the minimum number of coins Chef needs to pay exactly X rupees.
Constraints
- 1≤T≤1000
- 1≤X≤1000
Sample 1:
Input
4 53 100 9 11
Output
3 0 9 1
Solution
for _ in range(int(input())):
X = int(input())
notes = X // 10
coins = X % 10
print(coins)