Knapsack problem/Continuous: Difference between revisions
Content added Content deleted
Line 387: | Line 387: | ||
(+ total (:price x)) |
(+ total (:price x)) |
||
(str instr "Take all " (:name x) "\n")) |
(str instr "Take all " (:name x) "\n")) |
||
(format "%sTake %.1f kg of %s\nTotal: %.2f" |
(format "%sTake %.1f kg of %s\nTotal: %.2f monies" |
||
instr cap (:name x) (+ total (* cap (per-kg x))))))))) |
instr cap (:name x) (+ total (* cap (per-kg x))))))))) |
||