题解 | 阶梯电费

阶梯电费

https://www.nowcoder.com/practice/e1a289f300d242b78325e9c98befa16c

x = int(input())
if x <= 100:
    print(x * 0.5)
elif x <= 200:
    print(50 + (x - 100) * 0.6)
else:
    print(110 + (x - 200) * 0.75)

全部评论

相关推荐

评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务