Tap here to switch tabs
Problem
Submissions

Problem: Number of Burgers with No Waste of Ingredients

med
30 min
Try to solve the Number of Burgers with No Waste of Ingredients problem.

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

med
30 min
Try to solve the Number of Burgers with No Waste of Ingredients problem.

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