A higher resolution is required to access the IDE
- 65
Statement
Goal
There is a building with N floors. You have X identical eggs.One of the floors (from
What is minimal amount of egg drops required in worst case to find out this highest floor from which the egg will not be broken?
It is recommended to solve "The Two Egg problem" first.
Input
Line 1: Integer N - number of floors in a building.
Line 2: Integer X - number of available eggs.
Line 2: Integer X - number of available eggs.
Output
Minimal amount of egg drops in worst case required to find out the highest floor from which the egg will not be broken.
Constraints
1 ≤ N ≤ 1000000
1 ≤ X ≤ 20
1 ≤ X ≤ 20
Example
Input
100 1
Output
100
A higher resolution is required to access the IDE