标签:class int span end key function ble pen code
def cakes(recipe, available):
# TODO: insert code
count = []
for item in recipe:
if item not in available:
return 0
else:
count.append(int(available[item]/recipe[item]))
return min(count)
还可以
def cakes(recipe, available): return min(available.get(k, 0)/recipe[k] for k in recipe)
标签:class int span end key function ble pen code
原文地址:http://www.cnblogs.com/sayHello2World/p/7131103.html