题号: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

liter of water.
For every turn, the robot will randomly select a real number

between

and

(

is a given number) and then fill the cup with

liter of water. The robot will repeat it until the cup is full (at least

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
(
), denoting the number of test cases.
In the following
lines, each line contains a real number
(
), describing a test case.
It is guaranteed that
contains no more than
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
输出
复制
7.3332227396
1.9477340411