洛谷-P1422 小玉家的电费

# -*- coding: utf-8 -*-
"""
Created on Wed Apr  4 19:58:38 2018


@author: wdf
"""


x = int(input())#输入 


if x<=150:
    y=0.4463*x
elif x<=400:
    y=0.4463*150+(x-150)*0.4663
else: 
    y=0.4463*150+(400-150)*0.4663+(x-400)*0.5663
print('%.1f'%y)
    
阅读更多

没有更多推荐了,返回首页