Snall in the well problem | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Snall in the well problem

I can't understand snell in the well ,plz understood me instead of giving the solution. Plz explain the relation between depth and the days. And plz explain everything of that .

28th Apr 2021, 6:42 AM
Aurosish dev
Aurosish dev - avatar
3 Answers
+ 1
And when the sum reaches to the input given or greater than the input break the loop
28th Apr 2021, 7:26 AM
Atul [Inactive]
+ 1
a snail can only crawl out of a well during the day. it crawls 7 feet a day. if it has not crawled the entire length of the well, it descends 2 feet at night. and a new day begins again
28th Apr 2021, 7:27 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
0
. Everyday the at day it is climbing 7 feet so make a variable sum for the summing the feets in a day and at night it is also coming 2 feet back so at each iteration subtract the sum by 2.
28th Apr 2021, 7:25 AM
Atul [Inactive]