以下是使用 Python 语言解决此问题的代码: ```python def calculate_price(a, b, c): if b == '92': price = 6.95 elif b == '95': price = 7.44 elif b == '97': price = 7.93 else: return "输入的汽油品种有误" if c =='m': discount = 0.05 elif c == 'e': discount = 0.03 else: return "输入的服务类型有误" total_price = a * price * (1 - discount) return total_price a, b, c = input().split() a = int(a) print("应付款:{:.2f}".format(calculate_price(a, b, c))) ``` [2024-10-25 08:45:41 | AI写代码神器 | 200点数解答]