Tap here to switch tabs
Problem
Submissions

Problem: Number of Burgers with No Waste of Ingredients

Number of Burgers with No Waste of Ingredients must use all tomato and cheese slices to make jumbo and small burgers, returning their counts in that order or an empty list if no exact combination exists.

Statement

Given two integers tomatoSlices and cheeseSlices, representing the count of available tomato slices and cheese slices.

Two types of burgers can be made:

  • Jumbo Burger: requires 44 tomato slices and 11 cheese slice.

  • Small Burger: requires 22 tomato slices and 11 cheese slice.

Return a list [total_jumbo, total_small] containing the number of jumbo burgers and small burgers that must be prepared such that every slice of tomato and cheese is used without any leftovers. If it is impossible to utilize all ingredients completely, return an empty list [].

Constraints:

  • 0≤0 \leq tomatoSlices, cheeseSlices ≤107\leq 10^7

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Number of Burgers with No Waste of Ingredients

Number of Burgers with No Waste of Ingredients must use all tomato and cheese slices to make jumbo and small burgers, returning their counts in that order or an empty list if no exact combination exists.

Statement

Given two integers tomatoSlices and cheeseSlices, representing the count of available tomato slices and cheese slices.

Two types of burgers can be made:

  • Jumbo Burger: requires 44 tomato slices and 11 cheese slice.

  • Small Burger: requires 22 tomato slices and 11 cheese slice.

Return a list [total_jumbo, total_small] containing the number of jumbo burgers and small burgers that must be prepared such that every slice of tomato and cheese is used without any leftovers. If it is impossible to utilize all ingredients completely, return an empty list [].

Constraints:

  • 0≤0 \leq tomatoSlices, cheeseSlices ≤107\leq 10^7