2399: Conveyor Belt Sushi

Memory Limit:128 MB Time Limit:1.000 S
Creator:
Submit:66 Solved:49

Description

There is a new conveyor belt sushi restaurant in town. Plates of sushi travel around the restaurant on a raised conveyor belt and customers choose what to eat by removing plates. Each red plate of sushi costs 3, each green plate of sushi costs 4, and each blue plate of sushi costs 5. Your job is to determine the cost of a meal, given the number of plates of each colour chosen by a customer.
城里新开了一家回转寿司餐厅。寿司盘子放在一个提升的传送带上绕着餐厅转,顾客通过取走盘子来选择他们要吃的寿司。每个红色盘子的寿司售价为3美元,每个绿色盘子的寿司售价为4美元,每个蓝色盘子的寿司售价为5美元。 你的任务是根据顾客选择的每种颜色盘子的数量,确定一餐的费用。

Input

The first line of input contains a non-negative integer, R, representing the number of red plates chosen. The second line contains a non-negative integer, G, representing the number of green plates chosen. The third line contains a non-negative integer, B, representing the number of blue plates chosen.
第一行输入包含一个非负整数R,代表选择的红色盘子的数量。第二行包含一个非负整数G,代表选择的绿色盘子的数量。第三行包含一个非负整数B,代表选择的蓝色盘子的数量。

Output

Output the non-negative integer, C, which is the cost of the meal in dollars.
输出非负整数C,即这顿餐的费用(以美元为单位)。

Sample Input

0 2 4 

Sample Output

28

HINT

Explanation of Output for Sample Input:
This customer chose 0 red plates, 2 green plates, and 4 blue plates. Therefore, the cost of the meal in dollars is 0 × 3 + 2 × 4 + 4 × 5 = 28.
输出样本解释:
 这位顾客选择了0个红色盘子、2个绿色盘子和4个蓝色盘子。因此,这顿餐的费用(以美元计算)为0 × 3 + 2 × 4 + 4 × 5 = 28。

Source/Category