Sanvi is playing with a coin in which number 1 is written on the top side and number 0 is written at the bottom side. She is planning to toss the coin exactly times. What is the probability that summation of coin tosses will either be A or B? Your task is to help her find the answer.
Input starts with an integer () denoting the total number of test-cases. Every test-case starts with (), denoting the total number of times coin is tossed. This is followed by a single line containing two different non-negative integer numbers having value at most , separated by a single space, denoting and respectively. (, )
For every case of input, output the answer in a single line denoting the answer as described in the problem statement. Error less than will be ignored.
Input | Output |
---|---|
2 1 0 1 2 2 1 | 1.000000 0.750000 |