No.2407 Bouns 2.0
タグ : / 解いたユーザー数 237
作問者 : 👑
hamamu
kusirakusira
Problem Statement
The supermarket "Daily, Discount Commodities" uses its own point card, and customers earn points when they buy products.
Specifically, at normal times, buying a product that costs $X$ yen earns $X$ points.
In addition, "Daily, Discount Commodities" has designated bonus days.
When shopping on a bonus day, you earn $B$ times the points you would earn at normal times, in addition to the points earned at normal times.
Find the total number of points earned when buying warabi mochi costing $W$ yen and zunda mochi costing $Z$ yen on a bonus day.
Constraints
- $W, Z$ are multiples of $10$.
- $10 \leq W, Z \leq 1000$
- $B$ is one of $0.5, 0.8, 1.2, 1.6, 2.0$.
Input
The input is given from standard input in the following format.
$W$ $Z$ $B$
Output
Output the answer as an integer. Notations such as 120.0 or 2.10e+3 are not allowed. Under the constraints of this problem, the answer is guaranteed to be an integer.
Sample
Sample 1
Input
100 200 2.0
Output
900
- The warabi mochi costs $100$ yen, so it earns $100$ points at normal times. Since it is a bonus day, an additional $100 \times 2.0 = 200$ points are earned.
- The zunda mochi costs $200$ yen, so it earns $200$ points at normal times. Since it is a bonus day, an additional $200 \times 2.0 = 400$ points are earned.
- In total, the points earned are $100 + 200 + 200 + 400 = 900$ points.
Sample 2
Input
150 240 1.6
Output
1014
Note that the answer must be output in integer notation.
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。