Number Addition and Subtraction Game
题目描述
Xiao Ming is playing a number addition and subtraction game, using only addition or subtraction to turn a number s into number t.
In each round, Xiaoming can add or subtract a number from the current number.
Now there are two numbers that can be used for addition and subtraction, namely a, b (a!=b), where b has no usage limit.
How many times can Xiao Ming use 'a' at least to change the number 's' into the number 't'.
The title ensures that number s can always be transformed into number t.
Input Description
The only line of input contains four positive integers s, t, a, b (1<=s,t,a,b<=10^5), and a!=b.
Output Description
The only line of output contains an integer, representing the minimum number of times 'a' needs to be used to turn number s into number t.
Test Case 1
1 10 5 2
1
The initial value of 1 is increased by a once to become 6, then increased by b twice to become 10, so the number of times a is used is 1
11 33 4 10
2
11 minus a twice becomes 3, then add b three times to become 33, so the number of times a is used is 2 times