TOHU - Help Tohu

Tohu wants to enter Moscow State University, and he must pass the math exam. He does not know math, and asks you to help him. The problem is to find the sum of the sequence on condition

Input

First line contains single integer T <= 20000 - the number of test cases.

Each of the next T lines contains single integer 1 <= n <= 10^9.

Output

For each n output the value with 11 digits after decimal point.

Example

Input:
2
2
5

Output: 0.70833333333
0.73809523810

Added by:Efim
Date:2011-06-15
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64

hide comments
2021-10-29 07:57:09
AC in one go!
2021-03-31 15:55:29
oalahh ez
2019-01-03 06:37:03
for ans match take 0.50 intialy as a sum
2018-12-07 13:15:47
Pure mathematics :)
2018-06-26 12:30:16
IIT-JEE math's. Memories ;)
2017-05-29 19:42:44 ankush
ac in one go easy
2017-04-03 15:35:27
When math fails you, put your trust in engineering: there is no need for an O(1) formula for Sn; just O(1) formula for An and solid engineering for 0.01s :-)
2016-06-22 11:00:30
try to find ak and then apply summation to get formula O(1)
2015-12-18 10:24:54 sneh sajal
@ dashingvimeet: output is right!! actually the formula which u are getting is valid for k>=2.we need to take care of k=1 in the summation!
2015-07-24 12:38:36 shikhar
i did the maths but could not find the expression
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.