Limits 1s, 256 MB

Dhaka is one of the mega cities of Bangladesh. At different times, Dhaka was entitled differently by poets, lyricists, and artists. The bus is one of the most used public transport here in Dhaka. A daily passenger who travels on a bus has to struggle to get in a bus amidst of crowd. When it comes to traveling through a bus, there is a phenomenon called ‘window dilemma’ where two passengers of front and back seats exchange hot words for their share of the empty space in the window.

You may know that the window of the bus has a sliding glass that slides horizontally. The horizontal length of the window is WW and the horizontal length of the sliding glass is GG. Your task is to slide the glass and distribute equal empty space to both passengers.

Input

The first line of input consists of an integer T(1T1000)T ( 1 \leq T \leq 1000 ) denoting the number of cases. The next TT lines contain two integers W(2<W1000)W ( 2 < W \leq 1000) and G(1G<W)G ( 1 \leq G < W) respectively indicating the horizontal length of the window and the horizontal length of the sliding glass.

Output

Print the length of the empty space of the window each passenger gets. The answer should be accurate at least up to four decimal places.

Sample

InputOutput
1
6 2
2

Submit

Login to submit.

Statistics

90% Solution Ratio
Uosmoy383Earliest, Nov '21
code_firesFastest, 0.0s
Uosmoy383Lightest, 131 kB
ShuddhoShortest, 69B
Toph uses cookies. By continuing you agree to our Cookie Policy.