U11Try2
This commit is contained in:
parent
f5eea3e49a
commit
dcc6f0811f
@ -3,6 +3,11 @@ def maximum_value(maximum_weight, items):
|
|||||||
return 0
|
return 0
|
||||||
if items == 0 or items is None or items ==[]:
|
if items == 0 or items is None or items ==[]:
|
||||||
return 0
|
return 0
|
||||||
|
if len(items) == 1:
|
||||||
|
curent_dic = items[0]
|
||||||
|
weight = curent_dic.get("weight")
|
||||||
|
if weight > maximum_weight:
|
||||||
|
return 0
|
||||||
|
|
||||||
|
|
||||||
def maximum_value_with_items(maximum_weight, items):
|
def maximum_value_with_items(maximum_weight, items):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user