题解 | 网购
网购
https://www.nowcoder.com/practice/5d7dfd405e5f4e4fbfdff6862c46b751
num_list = list(map(str, input().split()))
def compute(price, month, day, couple):
price = float(price)
if int(month) == 11 and int(day) == 11:
price *= 0.7
elif int(month) == 12 and int(day) == 12:
price *= 0.8
else:
price = price
if int(couple) == 1:
price -= 50
if price <= 0:
price = 0
return price
price = compute(num_list[0], num_list[1], num_list[2], num_list[3])
print(f"{price:.2f}")
查看16道真题和解析