Currency exchange
Time limit:1000ms Memory limit:65536k
Total submit:0 accepted:0
Description
China Merchants Bank met a very strange customer. The customer initially exchanged some people for another currency, and then kept exchanging one currency for the other, and finally changed back to the renminbi. Surprisingly, the yuan was eventually changed more than he had initially brought. For example such a conversion process: Assume 1 RMB to exchange 6.89 units of Mars currency, 1 units of Mars currency for 0.18 units of mercury coins, 1 units of mercury exchange for 0.81 units of renminbi. We exchange 8.27 units of the Mars currency with 1.20 units, then exchange the 8.27 units of the Mars Currency for 1.49 units of mercury, and finally exchange it with 1.49 units of mercury to 1.21 yuan. That's how miracles happen. Smart you must have found out, this is rounding up the credit. Of course this kind of thing is impossible in reality, but we still have to study this problem. Suppose there are n currencies, numbering from 1 to N. We initially held the M unit of currency 1. The exchange rate between the various currencies is known and rounded to two decimal places after each exchange. I would like to ask you to Exchange K and return to currency 1, the maximum amount of money we hold to increase the number of units.
Input
Input contains multiple sets of data. The first row of each set of data contains two integers: N (1≤n≤100), K (0≤k≤100), second act a real number m (0
Output
For each set of data output, we hold a maximum value of 1 of the currency, accurate to two decimal places. If it is not possible to add value, Output "0.00"
Sample Input
3 3
1.20
0.00 6.89 0.00 0.00 0.00 0.18 0.81
0.00 0.00
1 0
1.00
0.00
0 0
Sample Output
0.01
0.00
Source
ustc09p