Factorial trailing-zero judge accepts a solution truncated at 25

Abierto
#859 0 comentarios 0 reacciones 1 asignado Ver en GitHub

Los mantenedores suelen responder en 1 día

@dots0101 ya está trabajando en esto.

Desde el 25/11/2026.

  • #860 de @dots0101 — abierto

Evaluación

Dificultad
3/5
Tiempo estimado
Medio día
Aptitud para principiantes
20/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
json, nodejs, python
Área
testing-qa

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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
  1. At the tested source revision, evaluate the expression above for the five inputs 3, 5, 0, 25, and 100. It matches every expected value.
  2. Try 125. The expression returns 30, while 125! has 25 + 5 + 1 = 31 trailing zeroes.
  3. 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.

Lenguaje dominante
Rust
Estrellas
236
Forks
153
Merge medio
1 d 9 h
PR fusionados (30 d)
187

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de sysprog21/codetrial

Todos los issues de sysprog21/codetrial

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.