An engineer goes to a bank with a check of $200 and asks the cashier “Give me some one-dollar bills, ten times as many twos and the balance in fives!”
What will the cashier do?
The smallest amount of one-dollar and two-dollar bills the cashier may give to the old man is 1×1 + 10×2 = 21.
He must give the old man a multiple of 21 i.e. 21 or 42 or 63 or 84 or 105 or 126 or 147 or 168 or 187 without exceeding 200. Out of all these numbers only 105 can be added to a multiple of 5 to sum up to make 200 altogether.
So he must give the balance of 95 in five-dollar bills.
Therefore, the cashier must give 5 one-dollar bills, 50 two-dollar bills and 19 five-dollar bills.