Climbing Stairs
Practice
3.9 (22 votes)
Ad Hoc
Data structures
Open
Approved
Math
Easy
Mathamatics
Problem
85% Success 23861 Attempts 20 Points 1s Time Limit 256MB Memory 1024 KB Max Code
Alice is climbing stairs. There are total N stairs. She climbs A stairs upwards in day and she comes downstairs in night by B stairs. Find number of days she will take to reach the top of staircase.
Input:
First and only line contains three space separated integers denoting A, B, N.
Output:
Print only one line of output denoting the answer to the question.
Constraints:
1 ≤ B<A≤N ≤ 109
Please login to use the editor
You need to be logged in to access the code editor
Loading...
Please wait while we load the editor
Results
Custom Input
Run your code to see the output
Submissions
Please login to view your submissions
Similar Problems
Editorial
Login to unlock the editorial