The Audit (Bank Ledger)
After processing, also print an audit: deposits D, withdrawals W (successful ones only), denied K, largest L (the largest successful transaction, 0 if none), then balance B. Drop the inline denied lines.
Input: n, then n lines.
Output: Five audit lines in that order.
Difficulty: Hard. Write your answer in the browser editor, run the examples, then submit it against hidden tests. Python and JavaScript are free; other languages are part of licode Club.
Hint
- Keep counters for each kind of event.