PROBLEM LINK:Author: Ishpreet DIFFICULTY:SIMPLE PROBLEM:There are total N stairs. A person climbs A stairs upwards in day and comes downstairs in night by B stairs. Find number of days person will take to reach the top of staircase. EXPLANATION:Let us start by solving the problem day wise. Let us assume, on day X, he crossed N stairs. So,
(A  B) * (X  1) + A >= N All we need is the integer value of X which is >= (N  B) / (A  B). TESTER'S SOLUTION:
This question is marked "community wiki".
asked 03 Apr '16, 13:28
