-->
当前位置:首页 > 题库

PROGRAMMING:Calculation of step water price

Luz5年前 (2021-05-10)题库411
A city began to implement the new urban water supply price and sewage treatment fee standards in 2016. The price of water to the household shall be adjusted according to the water consumption. If the population of each household is less than 3 people, the water price of each household shall be charged according to the following standards:
|Water consumption classification | classification base | price to the household (yuan / m3)|
|---|---|---|
|First level | less than 17m3 (including 17m3) | 3.40|
|Second level | more than 17 m3, less than 30 m3 (including 30 m3) | 5.32|
|Third level | more than 30 cubic meters | 7.00|
Suppose that the population of each household who needs to calculate the water price is less than 3 people, that is, according to the above table, the water price is charged by level. It is required to input the water consumption of the current month and output the water charge of the current month. For example, if a family uses $$19.5 $$cubic meters of domestic water in the current month, the water charge is $$17 * 3.40 + (19-17) * 5.32 = 68.44 $$yuan
###Input format:
Enter the water consumption t of the current month in one line. T is an integer no more than 1000.
###Output format:
Output the corresponding water charge in one line, and keep 2 decimal places.
###Input example:
Here is a set of inputs. For example:
```in
nineteen
```
###Output example:
```out
sixty-eight point four four
```







answer:If there is no answer, please comment