The Wayback Machine - https://web.archive.org/web/20240204103505/https://www.geeksforgeeks.org/puzzle-snail-and-wall/
Open In App
Related Articles

Puzzle | Snail and Wall

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
Report

Puzzle: A snail wishes to reach a water shore. To do this it must cross a wall which is 30 feet high. It has a time limit of 30 hours to reach atop the wall. The time starts as soon as it starts climbing the wall. However, he faces a problem while climbing. Every hour it climbs the wall 3 feet up, it slides down 2 feet. This occurs every hour. So how many hours will it take for the snail to reach atop the wall?

Solution: Let’s think this thoroughly.

  1. Every hour the snail climbs up 3 feet, it slides down 2 feet. So, the actual height it is climbing in 1 hour is 1 foot.
  2. Similarly, in 25 hours, the snail would have climbed 25 feet, in 26 hours it would have climbed 26 feet and in 27 hours it would have climbed 27 feet, but things change after 27 feet.
  3. As we know, the snail covers 3 feet up in 1 hour. So, in the 28th hour, the snail would have climbed 30 feet up the wall and would have reached atop the wall. Therefore the answer to this riddle is 28 hours.

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Looking for a place to share your ideas, learn, and connect? Our Community portal is just the spot! Come join us and see what all the buzz is about!


Last Updated : 18 Jan, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads
Complete Tutorials