#K93537. Chair Rental Cost Calculation

    ID: 38441 Type: Default 1000ms 256MiB

Chair Rental Cost Calculation

Chair Rental Cost Calculation

You are given the number of chairs to be rented for various orders. Each chair costs \(5\) dollars. If more than \(50\) chairs are rented in a single order, a discount of \(10\%\) is applied to the total cost.

The cost is calculated as follows:

\[ \text{cost} = \begin{cases} 5 \times N, & \text{if } N \le 50,\\ 0.9 \times (5 \times N), & \text{if } N > 50 \end{cases} \]

Round the final result to two decimal places.

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 next (T) lines contains an integer (N) denoting the number of chairs to be rented in that test case.

outputFormat

For each test case, output the total rental cost (after applying any discount and rounded to two decimal places) on a new line, to standard output (stdout).## sample

3
1
50
51
5.00

250.00 229.50

</p>