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
blueflare99:
20210609 10:14:12
I'm a homo Last edit: 20210609 15:55:09 

as3727:
20200724 10:28:20
Coupon collector problem. #math,#linear recurrence 

singhsaab_056:
20200614 23:38:58
Prerequisite : Coupon Collector Problem


flowya:
20200131 12:56:25
straightforward application of random processes. 

sanket17:
20190715 06:25:38
Search Coupon collector problem without this its very difficult to think logic of this problem 

jmr99:
20181012 19:10:48
learned something new .. CCP * __ * 

adityad1998:
20180629 09:48:02
Maths has never been my thing. Took some time to understand the Coupon Collector problem.


prasanth292130:
20171024 19:13:39
Coupon collector problem.............AC in a go...


rohan_gulati:
20170609 09:16:54
Coupon Collector Problem:


rohit9934:
20170506 19:45:32
Simple Probabilty problem. #math tag. 
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 