#d1802. 吃蛋糕
吃蛋糕
Eating Cakes
Problem Description
There are plates, numbered . The -th plate holds () cakes. Little N will eat cakes according to the following rule, until all cakes are eaten:
Each time, he picks one of the plates uniformly at random. Suppose plate is chosen. If plate still has cakes, he eats one; if plate has no cakes, he does nothing.
Find the expected number of times he needs to eat all the cakes.
Input Format
The first line contains an integer .
The next line contains integers .
Output Format
Output the expected number of times needed to eat all the cakes. An absolute or relative error within is considered correct.
Sample Input
2
1 2
Sample Output
4.5
Constraints
For all data, .