```python weight = float(input()) fee = 0 if weight <= 2: fee = weight * 3 elif 2 < weight <= 5: fee = 2 * 3 + (weight - 2) * 5 else: fee = 2 * 3 + 3 * 5 + (weight - 5) * 10 print("%.2f" % fee) ``` [2024-09-28 01:54:21 | AI写代码神器 | 98点数解答]