Mr Snake has a strange growing ability. Suppose, his length is X units. If he eats X magic fruits, then his body length increases by Y units so that his new total body length becomes (X+Y) units.
Mr Snake is teased by his friends because of his short length. So, he wants to become Z units long. However, he can not figure out how many magic fruits he needs to eat.
Can you help Him?
Note: Z will be given such that (Z-X) is divisible by Y and X< Z.
First line of input will contain a single integer T denoting the number of test cases. Then T lines follow, each containing three integers X, Y and Z .
( 1<= T, X <= 100000, 1 <= Y <= 1000, 1 <= Z <= 1000000)
In a single line, print the number of magic fruits required to be eaten by Mr Snake to grow to Z units in length.
Input | Output |
---|---|
5 2 2 6 2 2 4 3 2 5 3 2 9 10 2 16 | 6 2 3 15 36 |