Factorial trailing-zero judge accepts a solution truncated at 25
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- Nửa ngày
- Mức phù hợp với người mới
- 20/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- json, nodejs, python
- Lĩnh vực
- testing-qa
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Rust
- Star
- 236
- Fork
- 153
- Merge trung bình
- 1 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 187
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của sysprog21/codetrial
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Unify Java harness validation error messagesCó thể đã có người làm @weichieh0204 đã nhận hôm nay. Đang mở
sysprog21/codetrial#872 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Inferred void class operations are never checked against the starter's return typeCó thể đã có người làm @papaya0112 đã nhận hôm nay. Đang mở
sysprog21/codetrial#871 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Edge Thumbnail Store accepts a store that does not refresh a key on overwriteCó thể đã có người làm @BOBOGUAGUA428 đã nhận hôm nay. Đang mở
sysprog21/codetrial#869 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của sysprog21/codetrial
Issue tương tự
-
marketing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
eliasstravik/herdr-projects#1605 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
jlcodes99/cockpit-tools#3332 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Cognito: the email MFA code (EMAIL_OTP challenge after a password flow) has 8 digits; AWS delivers 6Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
aws/aws-emulator#692 ·
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
pamburus/hl#1779 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày