Player

All submissions for this problem are available.
Read problems statements in Mandarin Chinese and Russian as well.
Petr, Nikita G. and Nikita are the most influential music critics in SaintPetersburg. They have recently downloaded their favorite band's new album and going to listen to it. Nikita claims that the songs of entire album should be listened strictly in the same order as they are given, because there is the secret message from the author in the songs' order. Petr, being chaotic, does not think so, hence he loves listening to songs in a random order. Petr is pretty good in convincing other people, so after a twohours discussion Nikita accepted listening in random order(the discussion's duration was like three times longer thatn the album's one). In this context random order means following: There are N songs in the album. In the very beginning random song is chosen(here and further "random song" means that every song has equal probability to be chosen). After some song is over the next one is chosen randomly and independently of what have been played before.
Nikita G., being the only one who is not going to drop out from the university, wonders, what is the expected number of songs guys have to listen to until every song is played at least once.
Input
The first line of the input contains an integer T denoting the number of test cases. The description of T test cases follows.
The first and only line of each test case contains a single integer N denoting the number of songs in the album.
Output
For each test case, output a single line containing the expected number of songs the guys will listen to. Your answer will be considered as correct if it has an absolute or relative error less than 10^{−1}. More formally if the expected output is A and your output is B, your output will be considered as correct if and only if
A − B ≤ 10^{−1} * max{A, B, 1}.
Constraints
Example
Input: 3 1 2 3 Output: 1.0 3.0 5.5
Explanation
Example case 2 After playing the first song there is 1/2 chance to finish the album each time new song is played. So the expected number of songs is 2/2 + 3/4 + 4/8... = 3
Author:  rubanenko 
Tester:  tuananh93 
Editorial  http://discuss.codechef.com/problems/RRPLAYER 
Tags  Rubanenko, cook53, dynamicprogramming, easymedium, probability 
Date Added:  8102014 
Time Limit:  1 sec 
Source Limit:  50000 Bytes 
Languages:  C, CPP14, JAVA, PYTH, PYTH 3.5, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, TEXT, CLOJ, FS 
Comments
 Please login at the top to post a comment.
SUCCESSFUL SUBMISSIONS
Fetching successful submissions
HELP
If you are still having problems, see a sample solution here. 