M_SEQ - Mosty! Find Gn
Omar want to examine Mostafa in math, Mostafa asked to give G(n) that defined as:
while:
Mostafa need your help to find G(n) (n : given integer)
assume that : F(1) = 8, F(2) = 8;
Input
T number of test cases in the first line, T line follow with an integer n.
Output
Print G(n) for each test case with 8 decimal digits after the point (0 < G(n) < 3)
Example
Input: 3
5
7
42
Output: 2.20000000 2.14285714 2.02380952
Constraints
T < 10^4
2 < n < 10^9
hide comments
Sir_Ostara:
2014-01-06 18:52:03
Beautiful.. Last edit: 2014-01-06 18:52:46 |
|
Mitch Schwartz:
2013-06-20 12:02:58
My old code got 0.00s again when I resubmitted it.
|
|
wisfaq:
2013-06-17 12:24:51
Personally I miss the point of rejudging this problem.
|
|
omar alkattan:
2013-06-16 14:47:13
All submits have been rejudged
|
|
checks:
2013-03-13 07:13:39
Getting TLE. Any suggestions. Using one for loop inside the TC loop of while.
|
|
(Tjandra Satria Gunawan)(曾毅昆):
2013-02-21 05:42:16
|
|
Francky:
2013-02-20 15:49:16
Answer have to be rounded, not truncated! (It is unspecified in description, but I agree that it's obvious). |
Added by: | omar alkattan |
Date: | 2013-02-20 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All |
Resource: | own |