首页 > 其他 > 详细

leetcode-165周赛-1276-不浪费原料的汉堡制作方案

时间:2019-12-02 19:01:17      阅读:93      评论:0      收藏:0      [点我收藏+]

题目描述:

技术分享图片

 

 技术分享图片

 

 技术分享图片

 

 自己的提交:

class Solution:
    def numOfBurgers(self, tomatoSlices: int, cheeseSlices: int) -> List[int]:
        t = (tomatoSlices - 2 * cheeseSlices) / 2
        c = cheeseSlices - t
        if t % 1 != 0 or t < 0 or c < 0:
            return []
        return [int(t),int(c)]
        

 

leetcode-165周赛-1276-不浪费原料的汉堡制作方案

原文:https://www.cnblogs.com/oldby/p/11972508.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!