题解 | 网购

网购

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}")



全部评论

相关推荐

牛客52071342...:不同的岗位,你得把不对口的内容删掉一些,优化一下,人家公司不管你有多少技能,他只看对他有用的技能,你得根据公司的需求简化简历
那些拿到大厂offer的...
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务