题解 | #称砝码#
称砝码
http://www.nowcoder.com/practice/f9a4c19050fc477e9e27eb75f3bfd49c
```while True:
try:
n = int(input())
m = list(map(int, input().split()))
x = list(map(int, input().split()))
res = []
for i in range(n):
for j in range(x[i]):
res.append(m[i])
weight = {0}
for i in res:
for j in list(weight):
tmp = i + j
weight.add(i+j)
print(len(weight))
except:
break