| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 | 1024 MB | 2609 | 2303 | 2222 | 88.844% |
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.
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.
Output the non-negative integer, C, which is the cost of the meal in dollars.
0 2 4
28
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.