#P1422. Electricity Bill Calculation

    ID: 14708 Type: Default 1000ms 256MiB

Electricity Bill Calculation

Electricity Bill Calculation

In summer, the electricity consumption increases, hence the electricity bill increases as well. In this problem, you are given the total monthly electricity usage in kilowatt-hours (kWh). According to the pricing guidelines (as referenced in \(\text{闽价电 [2006]27\) ), the cost is computed based on the following tiers:

  • For the first \(150\) kWh (i.e., when usage \(\le 150\)): \( cost = \text{usage} \times 0.4463 \) yuan.
  • For the next portion between \(151\) and \(400\) kWh: \( cost = 150 \times 0.4463 + (\text{usage} - 150) \times 0.4663 \) yuan.
  • For any usage above \(400\) kWh: \( cost = 150 \times 0.4463 + 250 \times 0.4663 + (\text{usage} - 400) \times 0.5663 \) yuan.

Your task is to compute the total bill based on the provided total monthly electricity usage.

inputFormat

The input consists of a single line containing a positive integer representing the total electricity usage in kWh.

outputFormat

Output the electricity bill calculated according to the above rules, formatted to two decimal places.

sample

100
44.63