Combine The Gears

아직 제출이 없습니다시간 제한2초메모리 제한256 MB

문제

With the rapid development of society, the demand for high-precision clocks is constantly rising. Recently, the China Clock Production Company is developing a new type of clock, which can represent a wide range of times.

The novel clock displays the current time in an unusual fashion. The clock consists of several pointers, each controlled by a gear. All gears rotate synchronously -- one tooth per period. However, the numbers of teeth of the gears may differ. If a gear has tt teeth, then the corresponding pointer can point to tt different directions, denoted 0,1,2,,t10, 1, 2, \cdots, t-1, respectively, where 00 is the initial direction. Furthermore, if a clock is equipped with nn pointers, the ii-th of which is controlled by a t_it\_i-tooth gear, then the ii-th pointer will point to kmodt_ik \bmod t\_i after kk periods of time.

The price for a tt-tooth gear is tt yuan. Given a total budget of bb yuan, you need to design a combination of gears, such that the number of valid combinations of directions of pointers is maximized, and the total cost on gears does not exceed the budget. A combination of directions (d_1,d_2,,d_n)(d\_1, d\_2, \cdots, d\_n) is valid, if it can be written (kmodt_1,kmodt_2,,kmodt_n)(k \bmod t\_1, k \bmod t\_2, \cdots, k \bmod t\_n) for some nonnegative integer kk, where t_it\_i is the number of teeth of the ii-th gear. Since the answer may be too large, output the answer in natural logarithm (logarithm with base e=2.718281828)e = 2.718281828\cdots).

입력

The first line of input is a single integer TT (1T30;000)(1 \leq T \leq 30\\;000), indicating the number of test cases. Each test case is a single line of an integer bb (1b30;000)(1 \leq b \leq 30\\;000), denoting the total budget.

출력

For each test case, print the natural logarithm, within an absolute or relative error of no more than 10610^{-6}, of the maximum number of valid combinations, in a single line.

힌트

For the second sample data, a 3-tooth gear along with a 4-tooth gear may yield 12 different combinations of directions, with total cost exactly being 7. So you should print the value of ln12\ln 12, which is approximately 2.484906650.