Factorial trailing-zero judge accepts a solution truncated at 25
维护者通常 1 天内回复
评估
- 难度
- 3/5
- 预计耗时
- 半天
- 新手友好度
- 20/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- json, nodejs, python
- 领域
- testing-qa
调研方向
The judge entry for factorial-trailing-zeroes lives in problem-bank/judges.json, with a generated judge file and a package fixture that must be updated alongside it. Check that the expression n // 5 + n // 25 gets rejected once the cases 125 (expected 31) and 10000 (expected 2499) are added. Pull request #860 is already open against this issue and the author asked for assignment, so check that work is not duplicated before starting.
由索引模型根据 Issue 内容生成。
描述
Observed behavior
The built-in judge for factorial-trailing-zeroes accepts n // 5 + n // 25 on all five of its test inputs. Starting at 125, that expression undercounts factors of five.
Expected behavior
The judge should reject an implementation that ignores higher powers of five within the stated input range (0–10,000).
Reproduction
- At the tested source revision, evaluate the expression above for the five inputs 3, 5, 0, 25, and 100. It matches every expected value.
- Try 125. The expression returns 30, while 125! has 25 + 5 + 1 = 31 trailing zeroes.
- Try 10,000. Even summing through 625 gives only 2,496. The correct answer is 2,000 + 400 + 80 + 16 + 3 = 2,499.
CodeTrial version
codetrial 0.1.0 (1ed2e26) locally. The judge data was independently rechecked at upstream source revision 925db68fffc8e1d89f928c0b4c28ae482befafed.
Environment
Windows, Python integer arithmetic against the problem-bank data, and Node.js for the targeted judge regression test.
Evidence and proposed fix
A local patch adds both cases, independently checks the expected values by counting factors in individual multiples of five, and updates the generated judge and package fixture. The targeted regression, generated-file checks and package golden check pass.
I'd like to take this issue and submit that fix. Please assign it to me (@dots0101) if the scope looks right.
- 主要语言
- Rust
- 星标
- 236
- 派生
- 153
- 平均合并
- 1 天 9 小时
- 30 天内合并 PR
- 187
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
sysprog21/codetrial 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 70/100
维护者通常 1 天内回复
-
Unify Java harness validation error messages可能已有人在做 @weichieh0204 今天认领。 未关闭
sysprog21/codetrial#872 · 1 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Inferred void class operations are never checked against the starter's return type可能已有人在做 @papaya0112 今天认领。 未关闭
sysprog21/codetrial#871 · 1 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Edge Thumbnail Store accepts a store that does not refresh a key on overwrite可能已有人在做 @BOBOGUAGUA428 今天认领。 未关闭
sysprog21/codetrial#869 · 1 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
查看 sysprog21/codetrial 的全部 Issue
相似的 Issue
-
marketing
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
eliasstravik/herdr-projects#1605 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 88/100
jlcodes99/cockpit-tools#3332 ·
维护者通常 3 天内回复
-
Cognito: the email MFA code (EMAIL_OTP challenge after a password flow) has 8 digits; AWS delivers 6未关闭
难度 2/5 1-3 小时 新手友好度 72/100
aws/aws-emulator#692 ·
-
bug
难度 1/5 1 小时以内 新手友好度 82/100
维护者通常 1 天内回复