Problem A
Absurdistan Roads II

The people of Absurdistan discovered how to build roads only last year. After the discovery, each city decided to build its own road, connecting the city with some other city. Each newly built road can be used in both directions.
Absurdistan is full of absurd coincidences. It took all
Task
Each city picked uniformly at random another city to which they built a road. Calculate the probability that the road network ends up being connected.
Input
The first line contains an integer
Output
Output one line containing a floating point number denoting
the probability that the randomly built road network with
Sample Input 1 | Sample Output 1 |
---|---|
4 |
0.962962962963 |
Sample Input 2 | Sample Output 2 |
---|---|
2 |
1.000000000000 |