SP8335 CNTTEAMS - Counting the teams
Description
The teacher in the Dystopian School for Politics and other Dirty Games (DSPDG) is training students in group activities. She feels that to really understand group behavior, students need to practice working in groups of different sizes. This is how she groups the students:
There are N students in the class, with roll numbers from 1 to N(2
The N students stand far from each other. Now student 1 goes and joins his target. After this, student 2 (and any student who is with him) joins 2's target. At the i $ ^{th} $ step, student i and anyone who is already with him joins i's target. In case i's target is already with him, nothing is done.
By following this procedure, when all students have joined their targets, the class gets split into some groups. For example, assume that there are 6 students in the class and the permutation that has been generated is {2,4,5,6,3,1}. First, 1 goes and joins 2. Then 1 and 2 join 4. Then 3 joins 5. Then 1, 2 and 4 join 6. 5 is already with 3 and hence does not move. Similarly 6 is already with 1 and does not move. In the end, we have 2 teams : {1,2,4,6} and {3,5}
Given N, find out the expectation value of the number of teams that will be formed when the teacher groups the class in this fashion.
Input Format
First line of the input contains T(
Output Format
For each N, output the expectation value of the number of groups formed. Output 6 digits after the decimal point while printing the expectation value