FAVDICE  Favorite Dice
BuggyD loves to carry his favorite die around. Perhaps you wonder why it's his favorite? Well, his die is magical and can be transformed into an Nsided unbiased die with the push of a button. Now BuggyD wants to learn more about his die, so he raises a question:
What is the expected number of throws of his die while it has N sides so that each number is rolled at least once?
Input
The first line of the input contains an integer t, the number of test cases. t test cases follow.
Each test case consists of a single line containing a single integer N (1 <= N <= 1000)  the number of sides on BuggyD's die.
Output
For each test case, print one line containing the expected number of times BuggyD needs to throw his Nsided die so that each number appears at least once. The expected number must be accurate to 2 decimal digits.
Example
Input: 2 1 12 Output: 1.00 37.24
hide comments
vijay77794:
20160131 18:48:48
AC .................. :) 

Mayank Garg:
20160127 09:57:21
Nice concept :D My 300th green !! 

coder_shishir:
20151006 08:51:43
my 50th... 

Sarthak Munshi:
20150921 14:30:30
double required . float gives WA . 

anuveshkothari:
20150826 14:43:04
learned about coupon collector problem 

Vars:
20150817 06:50:45
my 100th with a piece of cake... :) 

shantanu tripathi:
20150813 22:07:02
learn about the famous "coupon collector prob" to solve this one. :) 

Avi Aryan:
20150717 10:35:23
Nice problem. My first problem with "Expected value" stuff. Looking forward to try some more. 

BadeMeow:
20150707 14:10:00
AC in one go! My 50th!! :D


SangKuan:
20150621 04:39:03
https://en.wikipedia.org/wiki/Coupon_collector%27s_problem.and use double 
Added by:  Matthew Reeder 
Date:  20061029 
Time limit:  1s 
Source limit:  30000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ERL JSRHINO NODEJS PERL6 VB.NET 
Resource:  AlKhawarizm 2006 