← 返回 stripe 的题目列表Max Reserve Balance Adjustment
类型:online_judge
Given a platform identifier and a list of transactions, for accounts other than the platform identifier, if the current balance is less than zero, you can borrow funds from the platform identifier to cover the shortfall. Output three results: max reserve, rejected transaction list, and users with non-zero balances and their balances. Example input with platform_id as acct_123:
account_name, timestamp, currency, amount
acct_123,1,usd,1000
acct_321,3,usd,400
acct_321,4,usd,-500
Output:
max_reserve = 100, rejected_transaction = [], acct_123 and 900
Example
Input
platform_id: acct_123
account_name, timestamp, currency, amount
acct_123,1,usd,1000
acct_321,3,usd,400
acct_321,4,usd,-500