/*
const data = {
5000: Infinity,
1000: Infinity,
500: Infinity,
100: Infinity,
50: Infinity
}
// Примеры использования:
console.log(getMoney(6200)); // {5000: 1, 1000: 1, 500: 0, 100: 2, 50: 0}
console.log(getMoney(6200, {5000: 0, 1000: 7, 100: 5})); // {5000: 0, 1000: 6, 100: 2}
*/
function computeOptimalCashBreakdown(amount, limits = {}) {
// Ваш код здесь
}
console.log(computeOptimalCashBreakdown(6200))