This commit is contained in:
Marege 2026-12-03 16:51:50 +01:00
parent bb72482df1
commit 5fb2cb585f

View File

@ -43,10 +43,10 @@ def maximum_value(maximum_weight, items):
def maximum_value_with_items(maximum_weight, items): def maximum_value_with_items(maximum_weight, items):
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: if len(items) == 1:
curent_dic = items[0] curent_dic = items[0]
weight = curent_dic.get("weight") weight = curent_dic.get("weight")
if weight > maximum_weight: if weight > maximum_weight:
return 0 return (0, [])