Factorial trailing-zero judge accepts a solution truncated at 25
Los mantenedores suelen responder en 1 día
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
- 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.
- Lenguaje dominante
- Rust
- Estrellas
- 236
- Forks
- 153
- Merge medio
- 1 d 9 h
- PR fusionados (30 d)
- 187
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de sysprog21/codetrial
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
Unify Java harness validation error messagesPosiblemente ocupada @weichieh0204 la tomó hoy. Abierto
sysprog21/codetrial#872 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Inferred void class operations are never checked against the starter's return typePosiblemente ocupada @papaya0112 la tomó hoy. Abierto
sysprog21/codetrial#871 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Edge Thumbnail Store accepts a store that does not refresh a key on overwritePosiblemente ocupada @BOBOGUAGUA428 la tomó hoy. Abierto
sysprog21/codetrial#869 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de sysprog21/codetrial
Issues similares
-
marketing
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
eliasstravik/herdr-projects#1605 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
jlcodes99/cockpit-tools#3332 ·
Los mantenedores suelen responder en 3 días
-
Cognito: the email MFA code (EMAIL_OTP challenge after a password flow) has 8 digits; AWS delivers 6Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
aws/aws-emulator#692 ·
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
pamburus/hl#1779 · 1 comentario ·
Los mantenedores suelen responder en 1 día