Python 称砝码
def count_possible_weights(n, weights, counts):# 初始化 dp 集合,包含 0(不称任何砝码)dp = {0}# 遍历每种砝码for i in range(n):weight = weights[i]count
def count_possible_weights(n, weights, counts):# 初始化 dp 集合,包含 0(不称任何砝码)dp = {0}# 遍历每种砝码for i in range(n):weight = weights[i]count