# -*- coding: utf-8 -*-
"""
ssss
"""
import itertools
# L=[1,2,3,4,5,6,8,8,9,7,5]
L=[5.00,5.00,5.00,5.00,5.00,5.00,12.00,18.00,20.00,28.00,40.00,40.00,40.00,40.00,40.00,137.00,184.00,196.00]
target=301
res=[]
for r in range(len(L)):
bn=itertools.combinations(L,r+1)
for b in bn:
if sum(b)==target:
if b not in res:
res.append(b)
print(res)
网友评论