Problem D
Tight words
Given is an alphabet
For example if
Input
Input is a sequence of lines, each line contains two integer
numbers
Output
For each line of input, output the percentage of tight words
of length
The output is considered correct if it is within relative or
absolute error
Sample Input 1 | Sample Output 1 |
---|---|
4 1 2 5 3 5 8 7 |
100.000000000 40.740740741 17.382812500 0.101296914 |