题解 | #称砝码#

categroy = int(input())
weights  = list(map(int,input().split()))
counts   = list(map(int,input().split()))

ls = {0} for weight,count in zip(weights,counts):  for i in range(count):
        ls = ls|{weight+j for j in ls} print(len(ls))   
print(len(ls))

全部评论

相关推荐

今年读完研的我无房无车无对象,月入还没有过万 看到他在朋友圈晒房产证,感叹自己白读了这么多年书
小浪_Coding:学历不代表就能赚多少钱, 自己硕士学历怎么说也是一方面好事, 工作只是为了谋生, 赚钱跟学历不挂钩, 看自己走什么样的路,做什么选择
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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