← 返回 coinbase 的题目列表Banking System Design
类型:online_judge
Design a simple banking system with the following operations:
Create Account: Each account has a unique ID and an initial balance.
Deposit: Deposit a specific amount into an account.
Withdraw: Withdraw a specific amount from an account.
Query Balance: Return the current balance of an account.
Constraints:
Account ID is unique during account creation.
Initial balance and transaction amounts are non-negative integers.
Please provide a code solution that supports the implementation and testing of the above functionalities.
Example
Input
create 123 100
deposit 123 50
withdraw 123 30
query 123