[Python3] Linear equation, explained (beats 100%)
We notice that the number of burger limited by chees slices, i.e. number of burgers are going to be equal to number of chees slices. Thus,  if we denote number 
We notice that the number of burger limited by chees slices, i.e. number of burgers are going to be equal to number of chees slices. Thus,  if we denote number of small burgers as `x` and number of big burgers as `y`, we got an equation `x + y = cheesSlices`. This immediately suggest the use of linear equations. Since we have 2 unknowns, we need a second equation which is `x*2 + y*4 = tomatoSlices`. Then we simply express `y` through the `x`, substitute one into another and calculate `y` and `x`.\n\n```\n\tx + y = cheesSlices\n\t2*x + 4*y = tomatoSlices\n\t\n\tx = cheesSlices - y\n\t2*(cheesSlices - y) + y*4 = tomatoSlices\n\t\n\ty = tomatoSlices/2 - cheesSlices\n```\n\nRuntime: 20 ms, faster than **100.00%** of Python3 online submissions for Number of Burgers with No Waste of Ingredients.\nMemory Usage: 14.3 MB, less than **53.33%** of Python3 online submissions for Number of Burgers with No Waste of Ingredients.\n\n```\nclass Solution:\n    def numOfBurgers(self, ts: int, cs: int) -> List[int]:             \n        x = ts/2 - cs\n        y = cs - x\n\n        if x < 0 or x % 1 or y < 0 or y % 1:\n            return []\n\n        return [int(x), int(y)]\n```\n
[]