Conveyor Belt Sushi | 프로그래밍의 벗 PivotOJ
PivotOJ

Conveyor Belt Sushi

시간 제한: 1000ms메모리 제한: 1024MB출처: CCC 2024 JuniorBOJ 32326
이 문제는 본문 이미지 일부가 표시되지 않습니다. 텍스트만으로 풀이가 어려울 수 있습니다.

문제

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.

[이미지 1]

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.

힌트

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.

예제

예제 1

입력
0
2
4
출력
28
코드를 제출하려면 로그인하세요.