An ATM dispenses exactly Rs. 5000 per withdrawal using 100, 200 and 500 rupee notes. The ATM requires every customer to give her preference for one of the three denominations of notes. It then dispenses notes such that the number of notes of the customer’s preferred denomination exceeds the total number of notes of other denominations dispensed to her.
Example:
for withdrawl of 2000
Withdrawal 0 notes of 100
Withdrawal 2 notes of 200
Withdrawal 3 notes of 500
Total Withdraw money is : 2000
Remaining Amt in A/C is : 82000