Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

325
Vistas
The Snail in the Well - Solo learn project

In a way of trying to solve the 23 code project of SOLOLEARN JavaScript course known widely with (The Snail in the Well) .. I produced this code which is worked with case of input = 128 and failed with input = 42. What I should modify in the code to implement the code successfully for all cases.

function main() {
    var depth = parseInt(readLine(), 10);
    //your code goes here
    
    let count=0
    for( let i=0;i<depth;){
        i+=5
        count++
    }
    console.log(count)
}

The Original Challenge:

P.S. //You can replace this [parseInt(readLine(), 10);] with 42 and 128 and remove the main function to enable work at any code editor.

almost 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Please share with us the problem or the challenge, in order to see the full picture.

almost 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda