第2章-3 阶梯电价 a = float(input()) tot = 0 if a < 0: print("Invalid Value!") else: if a >= 50: tot += 50 * 0.53 tot += (a - 50) * 0.58 else: tot += a * 0.53 print("cost = %.2f" % tot)