改换版表成熊了吧。。# Stock
S*t
1 楼
online submission 最后一道了 有点像knapsack problem
Minimize Cost of Fruits
There are three types of fruits providing energy 2, 3, 5 respectively, with
amounts given by cnt1, cnt2, cnt3, and the cost of fruits given by cost1,
cost2, and cost3 respectively. Given an energy level S, return the minimum
cost of the fruits that
will give energy S or greater. If no such combination is possible, return -1
def minCost(S, cnt1, cnt2, cnt3, cost1, cost2, cost3):
pass
Minimize Cost of Fruits
There are three types of fruits providing energy 2, 3, 5 respectively, with
amounts given by cnt1, cnt2, cnt3, and the cost of fruits given by cost1,
cost2, and cost3 respectively. Given an energy level S, return the minimum
cost of the fruits that
will give energy S or greater. If no such combination is possible, return -1
def minCost(S, cnt1, cnt2, cnt3, cost1, cost2, cost3):
pass