SNGSAS - Sum The Amazing Series

no tags 

Consider the series
(1 / 5) + (5 / 6) + (9 / 11) + (24 / 31) + (50 / 43) + ...

Input

First line of input is t (t < 5001). Next t lines contains a positive integer n (n < 6001).

Output

Output is sum of the series upto n terms, upto 2 decimal places.

Example

Input:
6
1
2
3
4
5
6 Output: 0.20 1.03 1.85 2.63 3.79 5.00

hide comments
stevenadriang: 2018-09-08 06:05:57

Last edit: 2018-09-08 06:47:07
xpshekhar: 2015-12-29 00:12:24

atleast provide some more terms
its difficult to analyse the series with given the 5 terms.
@avmnusng

AvmnuSng: 2014-07-23 16:59:11

@Rodolfo : sorry for the mistake, the term (40/43) is actually (50/43)

Rodolfo Riyoei Goya [USJT]: 2014-07-23 16:59:11

For n=5 output should not be: 3,56?

Alex Anderson: 2014-07-23 16:59:11

If you aren't going to describe the terms of the series, you should put this in "riddle" not "main=classical"


Added by:AvmnuSng
Date:2013-09-10
Time limit:0.5s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64
Resource:Abhimanyu Singh
My Problems