- CHANGELOG.md:v2.8.0 条目(中英双语); - README.md:版本行 2.7.1→2.8.0 + 愿景第 6 条(知识可证明); - doc/releases/v2.8.0.md:双语发版说明(亮点/用法/已知限制); - skills/marqdo-dev/index.mq.md:新增 prove 任务(路径/目录模式/ require_lean/json;参数用 + 行声明升参,check 与 narrative-ratio 通过); - 设计文档 §12.5 标记已合入;发版链接统一指向 doc/releases/v2.8.0.md。
1.6 KiB
Executable File
1.6 KiB
Executable File
Task: claims_reserve_settle (insurance claims reserve)
Implement an insurance claims reserve settlement desk. This is a business-policy pipeline (deductible, coinsurance, sublimit, recovery, floor), not an algorithms puzzle. Use integer arithmetic only. Hardcode the demo inputs below and print one integer: the final reserve.
Business requirements (authoritative)
- After deductible:
after_deduct = claim - deductible. Ifafter_deduct < 0, setafter_deduct = 0. - Coinsurance share (insurer):
coinsured = after_deduct * coinsure_pct / 100(demo coinsure_pct = 80). Apply coinsurance before recovery. - Sublimit cap:
capped = coinsuredifcoinsured <= sublimit, elsecapped = sublimit(never enlarge beyond coinsured). - Recovery offset:
reserved = capped - recovery. Ifreserved < 0, setreserved = 0. - Reserve floor: if
reserved < reserve_floor, setreserved = reserve_floor.
Demo inputs (hardcode)
claim = 50000deductible = 5000coinsure_pct = 80sublimit = 30000recovery = 2000reserve_floor = 1000
Requirements
- Provide named helpers (or clear stages) for deductible, coinsurance, sublimit, recovery, and floor — not one opaque expression.
- Print only the final integer (no labels).
- Align to the business requirements above; do not invent alternate order or comparison directions.
Expected output (self-check)
Exactly one line: 28000
Deliverable
Write the program as a Marqdo .mq.md file. Return the complete source in a single ```markdown fence — no prose outside the fence.