Java教程

2.10号英语翻译

本文主要是介绍2.10号英语翻译,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

题目来源:http://noi.openjudge.cn/ch0206/2421/

重点词汇:

engage in:.从事;

commission:n.佣金;

prevailing : adj.优势的,广布的;

crystal : n.水晶;

2421:Exchange Rates

     汇率

  • 查看
  • 提交
  • 统计
  • 提问
总时间限制: 
1000ms
 
内存限制: 
65536kB
描述
Now that the Loonie is hovering about par with the Greenback, you have decided to use your $1000 entrance scholarship to engage in currency speculation. So you gaze into a crystal ball which predicts the closing exchange rate between Canadian and U.S. dollars for each of the next several days. On any given day, you can switch all of your money from Canadian to U.S. dollars, or vice versa, at the prevailing exchange rate, less a 3% commission, less any fraction of a cent.
Assuming your crystal ball is correct, what's the maximum amount of money you can have, in Canadian dollars, when you're done?
现在加元徘徊在与美元相当的水平,你决定用你的·1000美元学费去从事货币投机。因此,您凝视着一个水晶球,它预测未来几天每一天加元和美元之间的收盘汇率。 在任何一天,您都可以将您的所有资金从加元转换为美元,反之亦然,按现行汇率减去 3% 的佣金,减去任何一分钱。

假设你的水晶球是正确的,当你完成后,你最多可以拥有多少加元?

输入
The input contains a number of test cases, followed by a line containing 0. Each test case begins with 0 <d ≤ 365, the number of days that your crystal ball can predict. d lines follow, giving the price of a U.S. dollar in Canadian dollars, as a real number.
输入包含许多测试用例,后跟包含 0 的行。每个测试用例以 0 <d ≤ 365 开头,即您的水晶球可以预测的天数。 接下来是 d 行,以加元表示美元的价格,作为实数。
输出
For each test case, output a line giving the maximum amount of money, in Canadian dollars and cents, that it is possible to have at the end of the last prediction, assuming you may exchange money on any subset of the predicted days, in order.
对于每个测试用例,输出一条以加元和美分表示的最大金额的行,假设您可以在预测日期的任何子集内兑换货币,则在最后一次预测结束时可能拥有的金额
样例输入
3
1.0500
0.9300
0.9900
2
1.0500
1.1000
0yo
样例输出
1001.60
1000.00
来源
Waterloo
这篇关于2.10号英语翻译的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!