CCC '24 J1 - Conveyor Belt Sushi

View as PDF

Submit solution


Points: 3 (partial)
Time limit: 3.0s
Memory limit: 1G

Problem type
Canadian Computing Competition: 2024 Stage 1, Junior #1

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.

Input Specification

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 Specification

Output the non-negative integer, C, which is the cost of the meal in dollars.

Sample Input

0
2
4

Output for Sample Input

28

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 \times 3 + 2 \times 4 + 4 \times 5 = 28.


Comments


  • -5
    MaxwellP  commented on Oct. 28, 2024, 7:38 p.m.

    This comment is hidden due to too much negative feedback. Show it anyway.


  • -6
    AdamChaCha  commented on Oct. 28, 2024, 7:37 p.m. edited

    This comment is hidden due to too much negative feedback. Show it anyway.


    • -6
      nothingno  commented on Oct. 28, 2024, 7:38 p.m.

      This comment is hidden due to too much negative feedback. Show it anyway.