以下是使用 Python 语言解决此问题的代码: ```python a, b, c = input().split() a = int(a) b = int(b) if b == 90: price = 6.95 elif b == 93: price = 7.44 elif b == 97: price = 7.93 if c =='m': discount = 0.05 elif c == 'e': discount = 0.03 total_price = a * price * (1 - discount) print("%.2f" % total_price) ``` 这段代码首先根据输入的汽油品种确定单价,然后根据服务类型确定折扣,最后计算并输出应付款,保留两位小数。 [2024-10-20 21:39:27 | AI写代码神器 | 177点数解答]