SUMUP - Sum the Series

Nilendu is a brilliant student of Mathematics and always scores A+ in it. His professor RamjiLal is quite impressed seeing his mathematical skills and asks him to sum the following series:

1/3 + 2/21 + 3/91 + 4/273 + .....

But the fact is Nilendu is quite lazy to do his assignment. He has to watch a film and many other activities to do. So he asks you for your help. Will you be able to solve it ??

Input

Input consists of t (number of test cases), then t line follows, each containing an integer N (1 <= N <= 10,000).

Output

A single line containing the sum upto Nth integer (rounded upto 5 digits)

Example

Input:
5
1
2
3
4
5

 Output: 0.33333
0.42857
0.46154
0.47619
0.48387

Edit: The score is your source length. The smaller your code is, the more point you will get. All the solutions have been rejudged !!!

Added by:Better late than never !!!
Date:2012-06-20
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64
Resource:RamjiLal Sir

hide comments
2013-05-25 06:57:34 Lalit M
how is the score given???
Re -> Score is the length of your source code. The smaller your code is, the more point you will get !!

Last edit: 2012-06-22 07:36:22
2013-05-25 06:57:34 Francky
Don't use round( ,5) in python !-> WA !
2013-05-25 06:57:34 jaans
@snehashish::: set the time limit correctly to about 1 sec or restrict the languages !! otherwise solutions in java and some other ones will never get AC!!
2013-05-25 06:57:34 jaans
@snehashish :: i think solutions were rejudged ??? is it true ?? naughty boy ;)

Re -> Yes, all the solutions have been rejudged. Sorry for the inconvenience !! By the way.. My name is Snehasish ... :P

Last edit: 2012-06-20 14:02:06
2013-05-25 06:57:34 Ranker
My dear great friend Nilendu!!!! @Snehasish good work dude!!

Re -> Thanks bro.. :)

Last edit: 2012-06-20 13:19:57
2013-05-25 06:57:34 jaans
love ya Nilendu!! :* ;)

Re -> Sorry to say.. But he is already in a relationship !! :P
Re to snehashish -> i know ;)

Re -> But how ?? :O
Re --> deep dark secrets ;)

Last edit: 2012-06-20 18:20:38
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.