mediumMath 0 views

Number of Burgers with No Waste of Ingredients

Given two integers tomatoSlices and cheeseSlices.

Given two integers tomatoSlices and cheeseSlices. The ingredients of different burgers are as follows:

Return [total_jumbo, total_small] so that the number of remaining tomatoSlices equal to 0 and the number of remaining cheeseSlices equal to 0. If it is not possible to make the remaining tomatoSlices and cheeseSlices equal to 0 return [].

Example 1

Input: tomatoSlices = 16, cheeseSlices = 7

Output: [1,6]

Example 2

Input: tomatoSlices = 17, cheeseSlices = 4

Output: []

Example 3

Input: tomatoSlices = 4, cheeseSlices = 17

Output: []

Constraints

  • 0 <= tomatoSlices, cheeseSlices <= 10^7

Hints

Companies

No companies reported yet.

Discussion

Sign in to join the discussion.

Loading discussion...

Test results

No test cases yet.