Question
Slow Start
Gaurav is playing a certain video game that requires him to collect Monsters, and use them to fight against other Monsters. Gaurav's favorite Monster has an attack stat of X, and is fighting against another monster whose health stat is H. The fight proceeds in turns: each turn, Gaurav's Monster does X damage to its opponent.
However, Gaurav's Monster has the ability Slow Start, which halves its attack for the first five turns.
That is, for the first five turns, the damage done to the opponent is X/2​ and not X.
How many turns will Gaurav's Monster take to defeat the opponent (i.e, do at least H damage to it)?
Input
The first line of input will contain a single integer T, denoting the number of test cases.
Each test case consists of a single line of input, containing two space-separated integers X and H - Gaurav's Monster's attack, and the opponent's health.

Constraints
1 ≤ T ≤ 104
1 ≤ X, H ≤ 103
X is even.
Output
For each test case, output on a new line the number of turns required for the opponent to be defeated.
Example
Sample Input
4
4 7
4 16
100 1
2 1000
Sample Output
4
7
1
503
Explanation
Test case 1: X = 4, so x/2 = 2, damage is done for the first five turns. By the fourth turn, 8 damage has been done, which is more than H = 7.

Online