# Practice on Toph

Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

# Once Upon a Time in Dhaka

By ihumaunkabir · 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 $W$ and the horizontal length of the sliding glass is $G$. 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 ( 1 \leq T \leq 1000 )$ denoting the number of cases. The next $T$ lines contain two integers $W ( 2 < W \leq 1000)$ and $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


### Statistics

97% Solution Ratio

Uosmoy383Earliest, 1M ago

coffeeloverFastest, 0.0s

Uosmoy383Lightest, 131 kB

anonyo.akandShortest, 70B