MONONUM  Monotonous numbers
Some integers possess interesting quality: each of their digits is not greater than the digit to the right. Let us define such integers as increasing integers. And let's call integers for which each digit is not lesser than the digit to the right decreasing integers. For example 24558 is increasing, 888410 is decreasing and 5  is both increasing and decreasing. Given n calculate the ratio of the decreasing ndigit integers to the increasing ndigit integers. We consider only positive integers. Leading zeros are not allowed.
Input
The first line of the input contains number t – the amount of tests. Then t test descriptions follow. Each test consists of the single integer n
Constraints
1 <= t <= 10000
1 <= n <= 10^{6}
Output
For each test print the needed ratio with six digits in the fractional part.
Example
Input: 2 1 2 Output: 1.000000 1.200000
hide comments
farhad chowdhury:
20160428 10:28:07
do i require bignum or there is a technique for finding ratio


kamran siddique:
20150417 12:25:51
Or any thing else there are lot of possiblities Last edit: 20150417 12:26:40 

Ankit Jhawar:
20130527 14:15:28
What is the answer for n=1000000? 

Andy:
20120424 15:57:38
:) Last edit: 20120430 17:02:09 

YYOrz:
20110815 12:46:23
It will cause accuracy problems with double?


alone:
20100209 18:59:09
@above


Jorge Luis Roque Alvarez:
20091221 20:35:09
for n=2


যোবায়ের:
20091105 11:44:31
@krishna, read again, the input is not the number, it is the number of digits you need to consider...[edit: Sorry for my mistake, George is right, I forgot to count the equal ones] Last edit: 20091106 18:02:23 

krishna kant :
20091105 11:19:48
How output can be 1.2 for 2 as a input, it should be 1.0. As 2 is increasing ang decreasing both. Last edit: 20091105 11:21:51 
Added by:  Spooky 
Date:  20091103 
Time limit:  0.800s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 NODEJS OBJC PERL6 SQLITE VB.NET 
Resource:  Advancement Autumn 2009, http://sevolymp.uuuq.com/, author: Alexey Shchepin 