Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

324
Visualizações
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 Respostas
Responde à pergunta

0

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

almost 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda