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
vladimira:
20170316 07:37:01
Coupon collecter problem, very useful piece of knowledge. Great problem. 

starbot:
20170314 12:59:14
Geometric random variable>>>>AC... 

nilabja16180:
20170307 21:02:58
Coupon Collector problem, helped! 

scorpion_ajay:
20170302 21:23:28
Mathematics always screw me...


harshil014:
20160911 19:08:23
Is there any new approach?


ashishranjan28:
20160909 22:26:51
coupon collector application


Pratik S:
20160821 04:54:46
Why is this argument wrong?


jitendrakk:
20160604 21:44:28
Hints.. in comment section. :( 

sy_117:
20160219 20:33:18
Easy after learning "Coupon Collector Problem"!!!! 

ghost_wire:
20160209 21:39:37
after reading coupon collector problem the question becomes too easy to solve .only need to take care of data type conversion. 
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 