题目描述:

自己的提交:

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-不浪费原料的汉堡制作方案的更多相关文章

  1. LeetCode 5276. 不浪费原料的汉堡制作方案 Number of Burgers with No Waste of Ingredients

    地址 https://leetcode-cn.com/problems/number-of-burgers-with-no-waste-of-ingredients/ 目描述圣诞活动预热开始啦,汉堡店 ...

  2. leetcode 165

    才一周没刷leetcode,手就生了,这个题目不难,但是完全AC还是挺费劲的. 题目描述: Compare two version numbers version1 and version2.If v ...

  3. [LeetCode] 165. Compare Version Numbers 比较版本数

    Compare two version numbers version1 and version1.If version1 > version2 return 1, if version1 &l ...

  4. Java实现 LeetCode 165 比较版本号

    165. 比较版本号 比较两个版本号 version1 和 version2. 如果 version1 > version2 返回 1,如果 version1 < version2 返回 ...

  5. ✡ leetcode 165. Compare Version Numbers 比较两个字符串数字的大小 --------- java

    Compare two version numbers version1 and version2.If version1 > version2 return 1, if version1 &l ...

  6. Leetcode 165 Compare Version Numbers

    题意:比较版本号的大小 有点变态,容易犯错 本质是字符串的比较,请注意他的版本号的小数点不知1个,有的会出现01.0.01这样的变态版本号 class Solution { public: int c ...

  7. Java for LeetCode 165 Compare Version Numbers

    Compare two version numbers version1 and version2.If version1 > version2 return 1, if version1 &l ...

  8. Java [Leetcode 165]Compare Version Numbers

    题目描述: Compare two version numbers version1 and version2.If version1 > version2 return 1, if versi ...

  9. leetcode 双周赛9 进击的骑士

    一个坐标可以从 -infinity 延伸到 +infinity 的 无限大的 棋盘上,你的 骑士 驻扎在坐标为 [0, 0] 的方格里. 骑士的走法和中国象棋中的马相似,走 “日” 字:即先向左(或右 ...

随机推荐

  1. Linux命令"ls"进阶说明

    pwd:the current working directory cd -: return to the previous working directory Filenames that begi ...

  2. CentOS6.8 安装/升级Python2.7.x,并安装最新setuptools、pip、fabric程序总结

    最终靠谱的可借鉴文档: 1.python官网 2.http://lovesoo.org/python-fabric-yuan-cheng-zi-dong-bu-shu-jian-jie.html 3. ...

  3. 【leetcode】436. Find Right Interval

    题目如下: 解题思路:题目要求的是对于任意一个区间i,要找出一个区间j,使得j的起点最接近i的终点.既然这样,我们可以把所有区间的终点组成一个列表,并按大小排序,使用二分查找就可以快速找到j区间.注意 ...

  4. php strcasecmp()函数 语法

    php strcasecmp()函数 语法 作用:比较两个字符串(不区分大小写)直线电机驱动器 语法:strcasecmp(string1,string2) 参数: 参数 描述 string1 必须, ...

  5. web uploader 上传大文件总结

    这里只写后端的代码,基本的思想就是,前端将文件分片,然后每次访问上传接口的时候,向后端传入参数:当前为第几块文件,和分片总数 下面直接贴代码吧,一些难懂的我大部分都加上注释了: 上传文件实体类: 看得 ...

  6. 【Vue】记录一个之前解决跨域问题

    proxyTable: { "/proxy/": {//以/proxy/为开头的适合这个规则 target: "http://192.168.7.72:8000" ...

  7. python中的_ElementUnicodeResult是什么

    _ElementUnicodeResult在python中是字符串的一种,因为在python3中,字符串就是指以unicode编码规则存储的数据,而以其他方式如utf-8,ASCII编码方式存储的数据 ...

  8. 在RedHat中安装新字体

    安装 下载这个字体. http://pan.baidu.com/s/1c23znaS 密码:tldo 在/usr/share/fonts/truetype/, 下建立一个新的目录 YaHei Cons ...

  9. python字符串常用函数-大小写,删除空格,字符串切片

  10. 用于拆解和组合PDF中各个对象的shell脚本

    拆解脚本 header_start=0 header_len=15 xref_start=$(strings -a -t d $1 | grep -e "\bxref\b" | a ...