#SDNU1256. Problem D. XC’s pot
Problem D. XC’s pot
Description
XC joined in ACM has been a long time, but got nothing, sad grief he was heartbroken, angry with the sky, "why cuisine to Sri Lanka?". Suddenly, the sky flashed a white light. A huge stone monument descended from heaven. Above it was "code Cheats". Immediately XC starts his dream of going to the top of his life. However, the fact is that there are still some blows. The book is incomplete and only one of the worst cheats is recorded: If a match XC randomly selects a question to do, and does the right thing, he could AK. So he is confident full of LLC cup contest, the title of the contest is easy, if the degree of difficulty of the title exceeds the XC level, XC will spend a certain amount of time, and WA out, and then continue the game. If it is a simple question, XC will be able to drop the entire game AK while making this simple question.
The minimum difficulty of the topic is , it takes XC minute, and for each level you increase, you need to spend a minute to solve the problem. For the same problem, you have to spend the time to make the subject once again. Now XC keeps playing Cheats in the game until the AK game, and asks XC how long it takes to keep playing Cheats.
Format
Input
The first two integers, and , represent the number of questions and the difficulty that XC can solve.
Next lines, each line an integer, represents the difficulty of each topic.
Output
The XC casts the mathematical expectation of Cheat Time. Output if AK is not available (results are expressed as fractions if they are not integers)
Samples
5 1
2
3
4
5
6
1 2
1
CB
1