| 1 | prompt = """Implement ledger.py so that `python3 ledger.py` processes transactions.txt and writes the results: |
| 2 | - each line is `deposit ACCT AMOUNT`, `withdraw ACCT AMOUNT`, or `transfer SRC DST AMOUNT`; amounts are positive integers; every account starts at 0 |
| 3 | - process lines in order; a withdraw or transfer whose amount exceeds the source balance is rejected: append the line verbatim to rejected.txt (in input order) and apply nothing |
| 4 | - a transfer debits SRC and credits DST |
| 5 | - afterwards write balances.json: a JSON object mapping every account that appeared to its final integer balance, keys sorted |
| 6 | - create rejected.txt even when nothing was rejected""" |
| 7 | class = "long-horizon" |
| 8 | max_steps = 30 |
| 9 | timeout_sec = 600 |
| 10 |