比较两种采购策略: 1.每种货物都在AB间比价,哪个便宜买哪个; 2.全部网购。

a=list(map(int,input().split()))
b=list(map(int,input().split()))
price=0
for i in range(n):#将每种货物的最小价格加到总价上
    if a[i]>=b[i]:
        price+=b[i]
    else:
        price+=a[i]
if price>=x:#对比网购和供应商价格
    print(x)
else:
    print(price)