forked from WHC/Hermit
Vendored sashidown, OpenAI-compatible env (OPENAI_*), and bootstrap scripts. Co-authored-by: Cursor <cursoragent@cursor.com>
12 lines
543 B
Markdown
12 lines
543 B
Markdown
# 任务:修好 mini_calc
|
||
|
||
你在一个很小的 C 项目里。请完成下列事项后结束(不要无关重构):
|
||
|
||
1. 阅读 `README.md`、`calc.c`、`tests/smoke.sh`。
|
||
2. 修复 `add` 的 off-by-one bug(应为 `a+b`,不是 `a+b+1`)。
|
||
3. 实现真正的整数除法 `div_ints`(`a/b`,调用方已保证 `b!=0`)。
|
||
4. 运行 `make test`,确保全部用例通过。
|
||
5. 用简短中文说明你改了什么。
|
||
|
||
可用工具:`read_file`、`run_shell`、`write_file` / `apply_patch`。工作区根目录就是本项目。
|