提交时间:2024-12-24 15:35:40

运行 ID: 50608

urgent = True if urgent_char == "y" else False cost = 8 if weight > 1000: extra_weight = weight - 1000 num_500 = (extra_weight + 499) // 500 cost += num_500 * 4 if urgent: cost += 5 print(cost)