Question: using python programming language please can someone write me the code for the solution below? A snail climbs on a wall, it starts at the
using python programming language please can someone write me the code for the solution below?
A snail climbs on a wall, it starts at the bottom and climbs up nn meters a day. Regretfully, every night it slides mm meters down.
Given the height of the wall HH, write a program to calculate how many days required for the snail to reach the top of the wall.
Input:
Three non-negative integers nn, mm, and HH separated by a space. For example:
3 2 11
Output:
A single integer number, which is the number of days required for the snail to reach the top of the wall. For example:
9
If the snail will never be able to reach the top of the wall print Fail
Test 1
Test Input
3 2 11
Expected Output
9
Test 2
Test Input
5 2 9
Expected Output
3
Test 3
Test Input
3 4 3
Expected Output
1
Test 4
Test Input
0 0 3
Expected Output
Fail
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
