#K80347. Ticket Cost Calculation
Ticket Cost Calculation
Ticket Cost Calculation
You are given a group size and need to calculate the total cost of movie tickets. Each ticket costs $20. However, if the group size is at least 5, a discount of 20% applies to the total cost. In other words, if the group size is \(n\), the total cost is computed as:
\(\text{cost} = \begin{cases} 20 \times n & \text{if } n < 5 \\ 20 \times n \times 0.8 & \text{if } n \geq 5 \end{cases}\)
Your task is to process multiple test cases. For each test case, you will be given the number of people in the group, and you should calculate and output the corresponding total cost.
inputFormat
The input is read from standard input (stdin). The first line contains an integer \(T\) representing the number of test cases. Each of the following \(T\) lines contains a single integer \(n\), representing the group size.
Example:
3 1 5 10
outputFormat
For each test case, output the total cost on a separate line to standard output (stdout).
Example:
20 80 160## sample
1
1
20
</p>