Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

315
Views
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 answers
Answer question

0

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

almost 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!