Cake Baking

http://pdl.openjudge.cn/english/02/

描述

A banana cake takes 250 flour, 2 bananas, 75 sugar and 100 butter, and a chocolate cake takes 200 flour, 75 cocoa, 150 sugar and 150 butter. The profit of a chocolate cake is 45 and the profit of a banana cake is 40. And we have 4000 flour, 6 bananas, 2000 sugar, 500 butter and 500 cocoa. The question is how many of chocolate cakes and banana cakes should we bake for the fete to maximize the total profit.

一个香蕉蛋糕花费250单位面粉,2单位香蕉,75单位糖和100单位黄油,并且一个巧克力蛋糕花费200单位免费,75单位可可,150单位糖。巧克力蛋糕的利润是45并且香蕉蛋糕的是40.我们有4000单位的面粉,6单位香蕉,200单位糖,500单位黄油和500单位可可。问为了最大化总利润,我们应该烤多少巧克力蛋糕和香蕉蛋糕。

输入

N/A

输出

First line: one integer indicating the number of chocolate cakes.
Second line: one integer indicating the number of banana cakes.

第一行:代表巧克力蛋糕数量的整数。

第二行:代表香蕉蛋糕数量的zhengs

上一篇:子类调用父类重名方法和属性之代码实现


下一篇:LeetCode 554.砖墙