题解 | #称砝码#
称砝码
https://www.nowcoder.com/practice/f9a4c19050fc477e9e27eb75f3bfd49c
kind = int(input())
weigth = list(map(int, input().split()))
quantity = list(map(int, input().split()))
w_q = []
for i in range(kind):
for j in range(quantity[i]):
w_q.append(weigth[i])
wq = {0, }
for m in w_q:
for q in list(wq):
wq.add(m+q)
print(len(wq))
三奇智元机器人科技有限公司公司福利 65人发布

