J. Uniform Random Descent Process
time limit per test
2 seconds
memory limit per test
512 megabytes
input
standard input
output
standard output

In the study of probability theory and stochastic processes, the Random Descent Process (RDP) is an important class of mathematical models. In this context, we examine the following problem:

Given a positive integer $$$n$$$. You start with an integer $$$m$$$, whose initial value is $$$n$$$. In each operation, you replace $$$m$$$ with a uniformly random integer between $$$0$$$ and $$$m-1$$$ (inclusive) until $$$m$$$ becomes $$$0$$$. What is the expected number of operations required?

Input

The first line of the input contains an integer $$$T$$$ ($$$1\le T \le 10^5$$$), representing the number of test cases.

For each test case, there is a single line containing a single integer $$$n$$$ ($$$0\le n \le 10^5$$$).

Output

The output contains $$$T$$$ lines, one line for each test case, representing the expected number of operations required.

The absolute or relative error within $$$10^{-4}$$$ is considered correct: assuming the correct answer is $$$a$$$, your answer is $$$b$$$. It will be considered correct as long as $$$\frac{| a-b |}{max (a, 1)}\le 10^{-4}$$$.

Example
Input
5
0
1
2
10
100000
Output
0.000000000000000
1.000000000000000
1.500000000000000
2.928968253968254
12.090146129863335