Gusto has a payroll to distribute. Given the amount of current funds to distribute and a hash table of recipients your task is to calculate the even distribution of the funds. No need for an OOP solution, just code a function to do it,
Note: Order of distribution does not matter.
amount - total funds to distribute
recipients - {recipient: money owed}
Examples.
amount = 40
recipients = {a: 10, b: 5, c: 10, d: 8}
output = {a: 10, b: 5, c: 10, d: 8}
amount = 30
recipients = {a: 10, b: 5, c: 10, d: 8}
output = {a: 9, b: 5, c: 9, d: 7} or
output = {a: 9, b: 4, c: 9, d: 8}
amount = 20
recipients = {a: 10, b: 5, c: 10, d: 8}
output = {a: 5, b: 5, c: 5, d: 5}
amount = 10
recipients = {a: 10, b: 5, c: 10, d: 8}
output = {a: 2, b: 2, c: 3, d: 3}