I have to distribute newspapers, and the printing company gives it to me in bundles of $15$ and $25$, now if a store wants $115$ I will have to send them $4 \times 25$ and $1 \times 15$, or if they want $55$ I will send them $1 \times 25$ and $2 \times 15$.
And I would rather send bundles of $25$ then $15$, so if they ask for a $150$ copies, I want to send them $6$ bundles of $25$ and not $10$ of $15$.
Is there a formula to find the best combination of the $2$ bundle sizes to send to my customers?
Are they guaranteed to make an order size that can be made up of 15s and 25s?
If so, subtract 15s from the order amount until what is left is divisible by 25, and then divide by 25 to get the number of 25 bundles.
You will never need to use more than four 15 bundles (If you used five, you could replace them with three 25 bundles), so this should go relatively quickly, and will use as many 25s as possible, since you use the minimum number of 15s to get to a point where what is left is divisible by 25.