Cup of Water
题号:NC236457
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
Special Judge, 64bit IO Format: %lld

题目描述

There is an empty cup, and a dumb robot is going to fill it with 1 liter of water.

For every turn, the robot will randomly select a real number t between 0 and x (x is a given number) and then fill the cup with t liter of water. The robot will repeat it until the cup is full (at least 1 liter of water has been filled).

You need to answer the expected number of turns the robot should fill.

输入描述:

The first line contains an integer T (), denoting the number of test cases.

In the following T lines, each line contains a real number x (), describing a test case.

It is guaranteed that x contains no more than 3 decimal places.

输出描述:

For each test case, output one line with a real number, denoting the expected number of turns.

Any answer with a relative or absolute error less than will be accepted.
示例1

输入

复制
2
0.3
1.5

输出

复制
7.3332227396
1.9477340411