package leetcode;

import java.util.List;

/**
 * https://leetcode.com/problems/number-of-burgers-with-no-waste-of-ingredients/
 */
public class Problem1276 {
    public List<Integer> numOfBurgers(int tomatoSlices, int cheeseSlices) {
        // TODO
        return null;
    }

    public static void main(String[] args) {
        Problem1276 prob = new Problem1276();
        System.out.println(prob.numOfBurgers(16, 7)); // [1,6]
        System.out.println(prob.numOfBurgers(17, 4)); // []
        System.out.println(prob.numOfBurgers(4, 17)); // []
        System.out.println(prob.numOfBurgers(0, 0)); // [0,0]
        System.out.println(prob.numOfBurgers(2, 1)); // [0,1]
    }
}

@@ -12,16 +12,71 @@
 tcode;%0A%0A
+import java.util.Arrays;%0Aimport java.util.Collections;%0A
 import j
@@ -90,16 +90,16 @@
 l.List;%0A
-
 %0A/**%0A * 
@@ -298,194 +298,257 @@
  // 
-TODO%0A        return null;
+4jumbo + 2small = tomato%0A        // 1jumbo + 1small = cheese
 %0A    
-%7D%0A%0A
     
-public static void main(String%5B%5D args) %7B%0A        Problem1276 prob = new Problem1276();%0A        System.out.println(prob.numOfBurgers(16, 7
+// small = cheese - jumbo%0A        // jumbo = (tomato - 2cheese) / 2%0A        int jumbo = (tomatoSlices - (2 * cheeseSlices)) %25 2 == 0 ? (tomatoSlices - (2 * cheeseSlices
 ))
-;
  /
-/ %5B1,6%5D
+ 2 : -1;
 %0A   
@@ -556,243 +556,177 @@
     
-System.out.println(prob.numOfBurgers(17, 4)); // %5B%5D%0A        System.out.println(prob.numOfBurgers(4, 17)); // %5B%5D%0A        System.out.println(prob.numOfBurgers(0, 0)); // %5B0,0%5D%0A        System.out.println(prob.numOfBurgers(2, 1)); // %5B0,1%5D
+int small = cheeseSlices - jumbo;%0A        if (jumbo %3C 0 %7C%7C small %3C 0) %7B%0A            return Collections.emptyList();%0A        %7D%0A        return Arrays.asList(jumbo, small);
 %0A   

Solve problem 1276