Our Chef who was a renouned mathematician has recently got into diamonds' business. 
She has accidentally misplaced $Q$ diamonds into a jar which already had $N$ chocolates. She then started wondering about an interesting question as following. 
If we pick items one by one at random without replacement, what would be the expected number of picks required to get all diamonds out. 

-----Input:-----
- First line will contain $T$, number of testcases. Then the testcases follow. 
- Each testcase contains of a single line of input, two integers $N$, $Q$. 

-----Output:-----
For each testcase, output the answer in a single line. Your answer is considered if its absolute or relative error doesn't exceed $10^{-6}$

-----Constraints-----
- $1 \leq T \leq 10^5$
- $1 \leq N \leq 10^5$
- $1 \leq Q \leq 10^5$

-----Sample Input:-----
1
2 2

-----Sample Output:-----
3.3333333333

-----EXPLANATION:-----
Here there are 2 Diamonds, 2 chocolates in the jar. 
Say C is chocolate, D is diamond.
If the random order of picking them from left to right is "CDDC", after 3 picks (CDD) all diamonds are out.
Similarly, for the remaining orders it would be the following:
"CDCD" => 4
"CCDD" => 4
"DDCC" => 2
"DCDC" => 3
"DCCD" => 4
Hence the expected number of picks would be (3+4+4+2+3+4)/6 = 3.333333

Difficulty: UNKNOWN_DIFFICULTY

Starter code:

Solutions:
for h in range(int(input())):
	(n, q) = map(int, input().split())
	print(q * (n + q + 1) / (q + 1))


import math
t = int(input())
while t > 0:
	t -= 1
	(p, q) = list(map(int, input().split()))
	print('{:.10f}'.format((p + q + 1) * q / (q + 1)))


t = int(input())
while t > 0:
	(n, q) = list(map(int, input().split(' ')))
	print(q * n / (q + 1) + q)
	t -= 1


import math
T = int(input())
for _ in range(T):
	word = input().split()
	N = int(word[0])
	Q = int(word[1])
	answer = 0
	answer += round(N + Q - N / (Q + 1), 15)
	print(answer)


from itertools import permutations
for _ in range(int(input())):
	pick = 0
	(n, q) = map(int, input().split(' '))
	print(round(q * (n + q + 1) / (q + 1), 10))


import math
t = int(input())
for t1 in range(0, t):
	(n, q) = list(map(int, input().split()))
	ok = (q + n + 1) * q / (q + 1)
	print('{0:.6f}'.format(ok))


for _ in range(int(input())):
	(a, b) = map(int, input().split())
	print(b * (a + b + 1) / (b + 1))


for _ in range(int(input())):
	(N, Q) = map(int, input().split())
	ans = Q * (N + Q + 1) / (Q + 1)
	print(f'{ans:.10f}')


def __starting_point():
	for i in range(int(input())):
		(n, q) = list(map(int, input().split()))
		res = q * (n + q + 1) / (q + 1)
		print(f'{res:.10f}')
__starting_point()


for _ in range(int(input())):
	(N, Q) = list(map(int, input().split()))
	z = (N + Q + 1) * Q / (Q + 1)
	print(z)


t = int(input())
for i in range(t):
	(n, q) = list(map(int, input().split()))
	ans = (n + q + 1) * q / (q + 1)
	print(ans)


for _ in range(int(input())):
	(n, m) = map(int, input().split())
	ans = (n + m + 1) * m
	ans = ans / (m + 1)
	print(ans)


for a0 in range(int(input())):
	(n, q) = list(map(int, input().split()))
	print(q * (n + q + 1) / (q + 1))


import sys
cin = sys.stdin

def getInts():
	return list(map(int, cin.readline().rstrip('\n').split(' ')))
t = getInts()[0]
while t:
	(n, q) = getInts()
	res = q + n * q / (q + 1)
	print(res)
	t -= 1


t = int(input())
for _ in range(t):
	(a, b) = list(map(int, input().split()))
	ans = a + b - a / (b + 1)
	ans = round(ans, 6)
	print(ans)