## Game Of Thrones

Time Limit: 1 sec
Memory Limit: 256 MB
Attempts: 0
Accuracy: 0.00%
Author: Akashdeep Goel

Stannis Baratheon and Danerys Targeryan are playing a game to win the Iron throne.

The rules of the game :

Initially there is a bag consisting of B blue balls and R red balls.

Both the players draw a ball from the bag alternatively.

The bag is magical hence a ball disappears randomly after every draw.

Whoever first draws a red ball is the winner.

Assume Stannis has the first chance to draw a ball.

If there are no Red balls left assume Danerys is the winner.

Every ball inside the bag has equal probability to disappear after a draw.

The disappeared balls or the balls taken out during a draw will never come back to the bag.

Disappearing will not occur if there are no balls inside the bag

In the name of one true king of Westros, Stannis Baratheon please tell the probability that Stannis wins the throne.

Input :

t the no of test cases. t lines follow each containing initial values of B,R

Output :

t lines containing the probability rounded to exactly 4 decimal places

Constraints :

0 < t < 10

0 < B,R <= 300

Sample :

Input :

2

2 2

3 4

Output

0.5000

0.6857

ID

SUBMITTED AT

STATUS

LANGUAGE

TIME

MEMORY USED

USER

TIME

STATUS

LANGUAGE

TIME

MEMORY USED