Shift the liquid
Time: 1 s
Memory: 125 MB
Memory: 125 MB
Mr. X has n liters of liquid in jar A. Now he wants to shift the liquid from jar A to jar B. To do so he use some moves. In each move, he can shift a maximum of m liters of liquid from jar A to jar B. Now, Mr. X wants to know the minimum number of moves needed to shift liquid from jar A to jar B
Input
The input contains two integers n and m
Constraint
\(1<= n,m <= 10^9\)
Output
Output the minimum moves required to shift liquid from jar A to jar B with a new line.
Examples
Input | Output |
---|---|
10 5
|
2
|
Input | Output |
---|---|
1 1
|
1
|
Problem Info
Problem ID | 13 |
Time Limit | 1000 ms |
Memory Limit | 128000 KB |
Moderators | Saidur , muncityuni , amit_SK |
Statistics
Submit
You need to Login or Registration for submit your solution