A frog is stuck at the bottom of a man-made well which is 21 feet deep. Each day, the frog is able to climb up 5 feet. However, each night, the frog slides down 3 feet. On which day would the frog be able to escape this well?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Can you add more details, so that others can understand your mysterious calculations?
Basically, my solution is divided into two: minimum number of days needed + additional days needed
Minimum number of days needed is 1, no matter how deep the well is the frog will at least take 1 day to escape this. This is because the question is: "on which day"
ceiling( 21-5 / 5-3) is to calculate the additional days needed, in other words, the number of days the frog will spend in the well. 21 is the depth of the well, 5 is the frog's jump, and 3 is the frog's slide.
Why 5-3 ? Because on everyday the frog is unable to escape from the well, it only goes up by 2. Why 21-5 ? Because the day the frog is able to escape from the well, the total outcome for the day is 5, and not 2.
1 + ceiling( 21-5 / 5-3 )
Challenge Master note: Can you add more details, so that others can understand your mysterious calculations?
on the 9 day the frog will start in 16 so he can up 5 meters and achieve the 21
there is a simple logic way to resolve this: First day he climbs 5m , but the next morning the frog it will be at 2m , so next day she will be at 7m. following this logic , at the beginning of 9th day it will be at 16m and will climb 5m exiting the well.
Se ao dia ele sobe 5 e a noite cai 3, sobre no final do dia 2 metros. se multiplicarmos 2*8=16 ... 16 metros subidos, no próximo dia ele irá subir mais 5 ... chegando assim ao topo !!!!
Representando o Brasil em, to votando na sua resolução, se puder vote na minha
9
Log in to reply
resumindo ... dá 9 dias !!!!! a multiplicação a qual o resultado dá 16 é o numero de dias .. ou seja 8(16 metros) ]+ 1(5 metros) = 9 dias !! entende agora?
Se ao dia ele sobe 5 e a noite cai 3, sobre no final do dia 2 metros. se multiplicarmos 2*8=16 ... 16 metros subidos, no próximo dia ele irá subir mais 5 ... chegando assim ao topo !!!!.. nice style.
The frog at the end of the day can climb up 5 − 3 = 2 feet ultimately.
And the frog can escape from the well in 2 1 / 2 = 1 0 days but at the last day it able to escape before night.
At the 10th day it can able to climb up 5 ∗ 1 0 − 9 ∗ 3 = 2 3 feet before night.
At the 9th day he will able to climb up 5 ∗ 9 = 4 5 feet, and before night it will total slide down 8 ∗ 3 = 2 4 feet.
And before the night it will able to climb up 4 5 − 2 4 = 2 1 feet, which is enough to escape from the well.
so, at the 9th day it will escape.
How can we avoid such a trial and error solution? We need to test many values. In fact, this solution also needs to show that the frog doesn't escape on the 8th day, in order to conclude that the frog goes indeed only escape on the 9th day.
What happens if the well is 1000 feet deep, and the frog climbs up 54 feet everyday and slides down 51 feet?
Thanks ! Now I understand ..
Each day the frog will make a 5ft - 3ft = 2ft climb; floor(21ft/2ft) takes 10 days in total but note that the frog has reached the escape on the 9th day before it slides down at night. Therefore, on the 9th day the frog has already reached the escape of the well.
every day frog climbs 2 feet net...EXCEPT for the last day where it clims 5 feet and jumps out of the well...so...
21-5 = 16
16 feet it climbs @ rate of 2 feet/day....i.e, 16/2 = 8 days
plus 1 day @ rate 5 feet...so total is 9 days..
since the frog covers a distance of 5 feet in day and moves down 3 feet at night, it means per day it covers a distance of 2 feet.so after 8 day it will cover 8*2=16 feet and on 9th day it will climb up 5 feet and will be out again (16+5=21)
it goes like this (days seperated by /) 5 2/ 7 4/ 9 6/ 11 8/ 13 10/ 15 12/ 17 14/ 19 16/ 21
Distance the frog will climb in the day is 5 feet. The distance it will slide down is 3 feet. So net height covered in a day in the whole day is 2 feet .So the net height covered in 8 days is 16 feet. But at the start of the 9th day he'll have covered the 5 feet which is required .He slides in the night and NOT simultaneously.
5-3+5-3+5-3..+...-3=8x2=16
so the 9th day =16+5=21
the answer is 9
Problem Loading...
Note Loading...
Set Loading...
Each day the frog climbs up 5 feet and slides down 3 feet,so it can actually climb up=5 feet-3 feet=2 feet,but on the last day it will climb up 5 feet.so,before the last day it will climb 21 feet-5 feet=16 feet,and it will take 16/2=8 days to climb up 16 feet.so it will take to climb up 21 feet=8+1=9 days