#P1422. 小玉家的电费
小玉家的电费
Description
Summer has arrived, and households are using much more electricity, so their electricity bills have increased as well. Today, Xiao Yu’s family received an electricity bill notice. Xiao Yu saw that it stated: According to Minjiadian [2006] No. 27, the portion of monthly electricity consumption up to and including kilowatt-hours is charged at yuan per kilowatt-hour, the portion within kilowatt-hours is charged at yuan per kilowatt-hour, and the portion at kilowatt-hours and above is charged at yuan per kilowatt-hour. Xiao Yu wants to verify whether the amount due on the bill is correct. Please write a program that, given the total electricity consumption, calculates the amount of the electricity bill according to the pricing rules.
Input Format
Input a positive integer representing the total electricity consumption (in kilowatt-hours), not exceeding .
Output Format
Output a number with exactly decimal place (in yuan).
267
121.5
Hint
Translated by ChatGPT 5
京公网安备 11011102002149号