|
||||||||||
Endless SpinTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1071 Accepted Submission(s): 277 Problem Description I spin it again and again,and throw it away finally. So now I have a row of n ball,named from 1 to n,each ball is white initially. At each step I randomly chose a interval [l, r] and paint all ball in this interval to black. It means every interval have a equal chance of being chosen. And I'll stop if all ball are black.What is the expected steps before I stop? Input The first line contains integer T(1<=T<=50). Denoting the number of the test cases. Then T lines follows, each line contains an integer n (1<=n<=50). Output For each test cases,print the answer in a line. Print the answer rounded to 15 decimal places. Sample Input
Sample Output
Hint 不建议使用long double Author WJMZBMR Source | ||||||||||
|