1058--Currency exchange __akoj

Source: Internet
Author: User
Tags time limit

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.