#K7816. Candy Cost Calculation

    ID: 35025 Type: Default 1000ms 256MiB

Candy Cost Calculation

Candy Cost Calculation

You are given a number of test cases. For each test case, you must calculate the total cost of candies purchased based on a discount policy. Initially, each candy costs $15. Discounts are applied as follows:

  • If the number of candies \(N > 50\), each candy is discounted by $5, so the price becomes \(15 - 5 = 10\).
  • If \(20 < N \leq 50\), each candy is discounted by $2, so the price becomes \(15 - 2 = 13\).
  • If \(N \leq 20\), no discount is applied and each candy costs \(15\).

The total cost for each test case is calculated as \(\text{total} = N \times p\), where \(p\) is the effective price per candy.

inputFormat

The first line of input contains an integer \(T\) representing the number of test cases. Each of the following \(T\) lines contains a single integer \(N\), the number of candies purchased in that test case.

outputFormat

For each test case, output the total cost (an integer) on a new line.

## sample
1
10
150

</p>