eolymp
bolt
Try our new interface for solving problems
Problems

Drawing Marbles

Drawing Marbles

A big box contains marbles of one or more colors. You're given the number of marbles of each color. You draw n marbles randomly from the box, leaving each marble outside the box after taking it. Find the probability that all marbles drawn will be the same color.

Input

Consists of multiple test cases. The first line of each test case contains the number of colors col (1col50) and the number n. The second line contains col integers c1, c2, .., ccol, where ci (1ci50) is the number of marbles of color i. It is known that 1nc1 + c2 + .. + ccol.

Output

For each test case print on a separate line the probability that all marbles drawn will be the same color. Print the probabilities with 4 digits after the decimal point.

Time limit 1 second
Memory limit 128 MiB
Input example #1
1 8
13
3 2
5 6 7
5 4
12 2 34 13 17
Output example #1
1.0000
0.3007
0.0350