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
Submissions
Please login to view your submissions
Similar Problems
Points:20
27 votes
Tags:
Basic MathC++Math
Points:20
432 votes
Tags:
Ad-HocEasyMath
Points:20
25 votes
Tags:
Binary SearchMath BasicAlgorithmsBasic MathMath
Editorial