In the realm of Calculus, the legendary mathematician Infinitus is fascinated by a peculiar infinite sequence. The sequence begins with an endless series of the number $$$X$$$. In each iteration, Infinitus inserts the sum of each consecutive pair of numbers between them, transforming the sequence as follows:
- Initially in iteration one, if $$$X = 5$$$ the sequence looks like this: $$$5, 5, 5, 5, \ldots $$$
- After the second iteration: $$$5, 10, 5, 10, 5, 10, \ldots$$$
- After the third iteration: $$$5, 15, 10, 15, 5, 15, 10, 15, 5, \ldots $$$
Your task is to answer $$$Q$$$ queries. For each query, given two numbers $$$X$$$ and $$$K$$$, determine the first iteration in which a number greater or equal to $$$K$$$ appears in the sequence starting with $$$X$$$.
- The first line contains an integer $$$Q$$$ $$$1 \leq Q \leq 1,000$$$, the number of queries.
- Each of the next $$$Q$$$ lines contains two integers $$$X$$$ and $$$K$$$ $$$( 1 \leq X \leq 1,000 ), ( 1 \leq K \leq 10^9 )$$$.
For each query, output a single integer representing the first iteration where a number greater than $$$K$$$ appears in the sequence.
35 15 105 15
1 2 3
11 5
4
This statement has been modified to include the clarifications made during the competition.
| Name |
|---|


