apples apples and crusts crusts. The goal is to bake pies that use up every last apple and crust.
Return [large, small], the number of large and small pies to bake. If there is no way to use everything up exactly, return an empty list.apples=10, crusts=3 → [2, 1]
Two large pies (8 apples, 2 crusts) and one small pie (2 apples, 1 crust) use exactly 10 apples and 3 crusts.
apples=9, crusts=3 → []
Every pie takes an even number of apples and 9 is odd, so nothing works.
apples=2, crusts=3 → []
Three crusts need at least 6 apples, and there are only 2.
apples=10, crusts=3
[2, 1]
Run checks the first 3 tests in your browser. Submit checks all 76 tests on the server, hidden ones included.