Preparando MOJI
You are given two positive (greater than zero) integers $$$x$$$ and $$$y$$$. There is a variable $$$k$$$ initially set to $$$0$$$.
You can perform the following two types of operations:
Find the minimum number of operations described above to set the value of $$$k$$$ to $$$y$$$.
The first line contains one integer $$$t$$$ ($$$1 \le t \le 2 \cdot 10^4$$$) — the number of test cases.
Each test case consists of one line containing two integer $$$x$$$ and $$$y$$$ ($$$1 \le x, y \le 10^9$$$).
For each test case, print one integer — the minimum number of operations to set the value of $$$k$$$ to $$$y$$$.
3 2 7 3 42 25 1337
4 5 20
In the first test case you can use the following sequence of operations:
In the second test case you can use the following sequence of operations: