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