单点时限: 2.0 sec
内存限制: 512 MB
AEMShana isn’t just charming, he is also very smart.
While some of us were learning the addition table, AEMShana had fun in his own manner.
AEMShana painted an $m\times m$ addition table, where the element on the intersection of the $i$-th row and $j$-th column equals $i+j$ (the rows and columns of the table are numbered starting from $1$).
Then he was asked: what number in the table is the $k$-th least number? AEMShana always answered correctly and immediately. Can you repeat his success?
Consider the given addition table. If you write out all $m\times m$ numbers from the table in the decreasing order, then the $k$-th number you write out is called the $k$-th leaest number.
Note
A $3\times 3$ addition table looks like this:
2 3 4
3 4 5
4 5 6
There are multiple test cases(not more than $1000$) in this problem.
In each test case contains integers $m$ and $k$.
$(1\leq m\leq 10^9,1\leq k\leq m\times m)$
Print the $k$-th least number in a $m\times m$ addition table.
3 4 114514 1919810
4 1960