FERT21_0 - Matches

Upon a table there are two boxes. Each box has N matches inside. We want to know what is the probability of choose N times a random box and take one match from it, at the end have an empty box.

You have to print all digits.

Constraints
1 <= T <= 1000
1 <= N <= 1000

Input

T
N1
N2
...
NT

Output

P1
P2
...
PT

Example

Input:
1
2

Output:
0.5

Added by:leandro
Date:2010-03-03
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: JS-RHINO OBJC SQLITE
Resource:own problem

hide comments
2010-04-02 11:31:51 Ankur Rastogi
more test cases pls
2010-03-16 19:44:36 leandro
T is the number of test cases and you should assume the highest precision...
2010-03-10 17:53:08 Richard Cocks
edit: Oh sorry it's clear from example that T is number of test cases. Sorry.

Last edit: 2010-03-10 17:54:07
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.