1547. Dollars

单点时限: 2.0 sec

内存限制: 256 MB

New Zealand currency consists of $100, $50, $20, $10, and $5 notes and $2, $1, 50c, 20c, 10c and 5c coins. Write a program that will determine, for any given amount, in how many ways that amount may be made up. Changing the order of listing does not increase the count. Thus 20c may be made up in 4 ways: 120c, 210c, 10c+25c, and 45c.

输入格式

Input will consist of a series of real numbers no greater than $300.00 each on a separate line. Each amount will be valid, that is will be a multiple of 5c. The file will be terminated by a line containing zero (0.00).

输出格式

Output will consist of a line for each of the amounts in the input, each line consisting of the amount of money (with two decimal places and right justified in a field of width 6), followed by the number of ways in which that amount may be made up, right justified in a field of width 17.

7 人解决,12 人已尝试。

8 份提交通过,共有 31 份提交。

7.1 EMB 奖励。

创建: 16 年,8 月前.

修改: 6 年,7 月前.

最后提交: 9 月,2 周前.

来源: UVa

题目标签