题解 | 讨厌鬼进货

讨厌鬼进货

https://www.nowcoder.com/practice/e364bac751204aa0b2d27389ca8e3c94

n, x = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
fee = 0
for i in range(n):#寻找购买第i件商品的最低价
    fee += min(a[i],b[i])
if fee>x:
    print(x)
else:
    print(fee)

全部评论

相关推荐

选钝角的小学生很热爱...:佬,今天收到的嘛?我三面结束二十天了,没人联系😅。请问你base哪里啊
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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