← 返回题库
高级

实现事件溯源(Event Sourcing)

未完成

示例

输入
solve()
期望输出
ORD001: status=shipped, amount=598.0
ORD002: status=cancelled, amount=0
ORD003: status=completed, amount=264.0
ORD016: status=paid, amount=97.77
ORD017: status=pending, amount=0
ORD018: status=paid, amount=764.41
ORD019: status=paid, amount=496.79
ORD020: status=pending, amount=0
ORD021: status=shipped, amount=0
ORD022: status=pending, amount=0
ORD023: status=paid, amount=585.77
ORD024: status=shipped, amount=0
ORD025: status=shipped, amount=0
ORD026: status=paid, amount=599.75
ORD027: status=shipped, amount=0
ORD028: status=pending, amount=0
ORD029: status=shipped, amount=0
ORD030: status=pending, amount=0
ORD031: status=pending, amount=0
ORD032: status=paid, amount=461.85
ORD033: status=paid, amount=463.71
ORD034: status=shipped, amount=0
ORD035: status=paid, amount=463.8
ORD036: status=paid, amount=859.13
ORD037: status=pending, amount=0
ORD038: status=paid, amount=369.58
ORD039: status=paid, amount=513.17
ORD040: status=paid, amount=315.68
Python 代码 🔒 登录后使用
🔒

登录后即可练习

注册免费账号,在浏览器中直接运行 Python 代码