#P10329. [UESTCPC 2024] Add
[UESTCPC 2024] Add
Problem Description
Given a sequence of length , initially . Perform operations on this sequence. In the -th operation, choose an integer uniformly at random from , and set to .
After all operations are finished, compute the expected value of .
Input Format
The first line contains a positive integer , the number of test cases.
The next lines each contain a positive integer , representing the length of the sequence.
Output Format
Output lines. Each line contains one integer, the expected value of .
3
4
2
5
30
5
55
3
4
3
5
30
14
55
3
8
1
3
204
1
14
Hint
Translated by ChatGPT 5