#Lutece1297. Bank

Bank

Migrated from Lutece 1297 Bank

All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.

Description

Given XXCNY (Chinese yuan), can you exchange it to exactly YYCNY soon? The only way you have is to spend money at a vending machine once, which has an infinite number of copies of merchandise of all possible positive price.

However, you cannot make any assumptions about the way the vending machine will make change; it is only guaranteed that it will dispense banknotes/coins that sum to the amount of change required.

What’s the smallest total amount you have to spend in all case, to get a banknote/coin of YYCNY?

Only 11fen (0.010.01CNY), 22fen, 55fen, 11jiao (0.10.1CNY), 22jiao, 55jiao, 11yuan (11CNY), 22yuan, 55yuan, 1010yuan, 2020yuan, 5050yuan and 100100yuan the vending machine will accept or return.

Input

The first line contains an integer TT, denoting the number of the test cases.

T100T \le 100 ;

Each test case contains two number XX and YY.

X,Y{0.01,0.02,0.05,0.1,0.2,0.5,1,2,5,10,20,50,100}X,Y \in \{ 0.01,0.02,0.05,0.1,0.2,0.5,1,2,5,10,20,50,100 \} and X>YX \gt Y.

Output

For each test case, output a number denoting the answer.

Samples

输入数据 1

2
0.05 0.01
0.1 0.01

输出数据 1

0.02
0.07

Note

只要找给你的钱能凑出Y就行

小数点后不要输出多余的位数,比如0.2不要输出0.20

对于任意X,假如你的答案是Z 那么对于X-Z的任意一种组合,都要能凑出Y

The sample input: If you spend 0.01,you may get 0.02 and 0.02,and can't get 0.01 anymore.

The answer is 0.02,in this case, you can get 0.01,0.01,0,01 or 0.01 0.02.

You can get 0.01 anyway.

Resources

The 14th UESTC Programming Contest Preliminary