Chef is watching TV. The current volume of the TV is
. Pressing thevolume up
button of the TV remote increases the volume by while pressing the volume down
button decreases the volume by . Chef wants to change the volume from to . Find the minimum number of button presses required to do so.
Input Format
- The first line contains a single integer
- - the initial volume and final volume of the TV.
Output Format
For each test case, output the minimum number of times Chef has to press a button to change the volume from
to.
Constraints
Sample Input 1
2
50 54
12 10
Sample Output 1
4
2
Explanation
Test Case 1: Chef can press the volume up
button
.
Test Case 2: Chef can press the volume down
button
No comments:
Post a Comment