Limits 1s, 1.0 GB

Poltu is a cyclist. He loves commuting by cycle. When he was a kid, often he was cycling in his dream. Now he is a software engineer at a ‘software development company’ in Dhaka. He usually goes home to office and office to home using his bicycle. Poltu commutes by cycle over the year even in rainy season.

One morning he took his cycle to go to office. It was a heavy rainy day. After paddling some kilometers he noticed a ‘new born sea’(!) in front of him. He failed to understand how can it be possible in the capital city, Dhaka. He saw a lot of floating plastic packets of chips, empty bottles and cans of soft drinks over the water. He got frustrated! Despite of the fact that most of the people of this area and the outside visitors are highly educated, still they threw away lots of their garbages to the roadside. Why? Who knows? (sigh…) This confined water is not only because of the garbages on the street but also for the lack of proper drainage system.

Anyway, by any means Poltu need to be reached at office. So he decided to cross that ‘sea’. Suddenly he saw a roadside signboard by Dhaka Metropolitan Police - “Panir Niche Rasta Bhalo (The condition of the road under water is well)”. This sign is assuring about the road but not about the depth of the water. He needs to find the height of the ‘sea’ because he can’t swim and he don’t want to take any risk without life jacket.

After a few moments he find a flying gas balloon middle of the sea. The balloon was hooked by a fiber. Another end of the fiber was tied with a heavy stone under the water. Then Poltu boomed the balloon throwing a stone. Then he saw the broken balloon is floating on the water attaching with the string from some distance of the original place. Although the current of the sea broken balloon is fixed on his position. Because the other side of the fiber is still tied with the stone under water.

Poltu assumed the height of the balloon was h from water surface. The displacement of the broken balloon from it’s original place is s. Help Poltu to find the depth d of the sea. If the depth is larger than Poltu’s height he’ll decide to take a ship otherwise he’ll cross the sea by his amazing bicycle.

Input

Input the number of test case TT (1T100001 \le T \le 10000). Then next TT lines contain two integers hh and ss (1h,s1000000071 \le h, s \le 100000007, hsh \le s). The details about hh and ss are mentioned above.

Output

Print the value of dd. Errors less than 10410^{-4} will be ignored.

Sample

InputOutput
3
1 5
3 7
2 4
12.0000000000
6.6666666667
3.0000000000

Submit

Login to submit.

Statistics

91% Solution Ratio
Rajan_sustEarliest, Sep '17
Yasir_ArafatFastest, 0.0s
evonlochLightest, 262 kB
Nusab19Shortest, 71B
Toph uses cookies. By continuing you agree to our Cookie Policy.