← Questions
Register and sell card receivables
0
I was asked this
No reports yet. Sign in to say where you were asked it.
In Brazil, card sales are registered as receivables: money a merchant will be paid on a given date for a given card network. You get a CSV of transactions (customer, merchant, payout date, card type, amount) and a CSV of contracts in which a lender buys a merchant's receivable (contract ID, merchant, payout date, card type, amount).
- Sum the transactions into one receivable per merchant, card type and payout date, and print them as CSV sorted by ID, card type, date and amount.
- Apply the contracts: each one takes over the matching merchant receivable, which is then listed under the contract's ID instead.
- A contract may buy only part of a receivable: list the contract's share under its ID and keep the rest under the merchant, dropping the merchant row when nothing is left.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Sign in to submit your code; every attempt is kept here.
Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding
