u11 update

This commit is contained in:
Maksym Kurets 2026-12-04 21:24:38 +01:00
parent 83f2d4c807
commit ef9842c117

View File

@ -13,8 +13,8 @@ def maximum_value(maximum_weight, items):
return TEPvalue
def maximum_value_with_items(maximum_weight, items):
if not items or maximum_weight <= 0
return 0, []
if not items or maximum_weight <= 0:
return 0, []
sorteditem = sorted(items, key=lambda x: x["value"] / x["weight"], reverse=True)