#CCBCHHAI0000019. Loại nhiên liệu (Type of Fuel)
Loại nhiên liệu (Type of Fuel)
Type of Fuel
Source: beecrowd
Version: Phuoc Hung OJ Extended
Problem Statement
A filling station records customer selections: 1 for Alcool, 2 for Gasolina, 3 for Diesel, and 4 to end the survey. Any other code is invalid and ignored. Read through the first 4, count each of 1, 2 and 3 before it, and do not count 4. Print the confirmation and three counts in the specified format.
Input
Positive integer codes separated by whitespace. The final code is 4, with no earlier 4. Other codes may be invalid.
Output
Print exactly four lines: MUITO OBRIGADO, Alcool: A, Gasolina: G, Diesel: D, where A, G, D are the three respective counts. Preserve exact capitalization and spelling.
Subtasks
- Subtask 1 (20%): At most 5 positive codes (including the final 4), each from 1 to 10.
- Subtask 2 (30%): At most 100 positive codes (including the final 4), each from 1 to 100.
- Subtask 3 (50%): At most 100001 positive codes (including the final 4), each from 1 to 1000.
Examples
Example 1
Input
1 2 3 2 4
Output
MUITO OBRIGADO
Alcool: 1
Gasolina: 2
Diesel: 1
Explanation
Codes 1, 2, 3, 2 contribute counts 1, 2, 1. Code 4 ends the survey without being counted.
Example 2
Input
8 4
Output
MUITO OBRIGADO
Alcool: 0
Gasolina: 0
Diesel: 0
Explanation
Eight is invalid and ignored; four terminates input, leaving all counts zero.