Save 25%Black Friday: 25% off all plans — use code BLACKFRIDAY2026 at checkout. Ends Monday, Dec 7.Claim the deal

(This question is a variation of the LeetCode question 2241. Design an ATM Machine. If you haven't completed that question yet, it is recommended to solve it first.)

In a split-tender transaction, a retail purchase can be paid with multiple payment methods, such as a gift card and a credit card. You are given events, an array of comma-separated event strings in chronological order.

Test Cases
Input
Output
Expected