ZC's birthday is coming, lxh gives a cake of n
as present for his girlfriend. Now lxh wants to know how many second do you need to divide it to many 1*1 cakes? Every second you can choose a connected part of cake, and cut it into two along a straight line.
In the first line, an integer T
is given indicating the number of test case.
For each case, you can get two integers n
in the line. (n, m
For each case, output the answer in a line.