2A. A saleswoman needs to receive 1100 gift boxes. In the supply warehouse, there are packages of 70, 40, and 25 gift boxes. The transportation cost for each package is 20, 10, and 7 denars, respectively. Which packages and in what quantities should the saleswoman order to minimize transportation costs? (Packages must not be opened in the warehouse.)
Solution. I method. The transportation cost of one box of the first type is $\frac{20}{70}=\frac{2}{7}$ den., of the second type is $\frac{10}{40}=\frac{1}{4}$ den., and of the third type is $\frac{7}{25}$ den. The cheapest transportation is for the second type of boxes, followed by the third type, and the most expensive is the first type. Since $1100: 40=27.5$, it follows that the maximum number of boxes of 40 bonbonieres that can be shipped is 27. However, this leaves $1100-27 \cdot 40=20$ bonbonieres, which do not make a complete package of any type. Therefore, fewer than 27 boxes of the second type must be shipped. If 26 boxes of the second type are shipped, then $1100-26 \cdot 40=60$ bonbonieres remain, which also do not make a complete package or a whole number of packages of any type. If 25 boxes of the second type are shipped, then $1100-25 \cdot 40=100$ bonbonieres remain, which make 4 packages of 25 bonbonieres. Therefore, to have the cheapest transportation, 25 boxes of the second type and 4 boxes of the third type should be shipped.

II method. Let $x$ be the number of packages of the first type that need to be shipped, $y$ the number of packages of the second type, and $z$ the number of packages of the third type. Then, $70 x+40 y+25 z=1100$ and the value of the expression $A=20 x+10 y+7 z$ should be the smallest. Here, $x, y$, and $z$ are integers such that $0 \leq x \leq 15, 0 \leq y \leq 27$, and $0 \leq z \leq 44$. By substituting $z=\frac{1100-70 x-40 y}{25}$ into the expression for $A$, we get $A=308+\frac{2}{5} x-\frac{6}{5} y$. Since the value of the expression $A$ is an integer, it follows that $5 \mid x$ and $5 \mid y$. Therefore, the value of $A$ is the smallest if for $x$ the smallest allowed value divisible by 5 is taken, and for $y$ the largest allowed value divisible by 5 is taken, i.e., the value of $A$ is the smallest if $x=0$ and $y=25$. Then, $z=\frac{1100-70 \cdot 0-40 \cdot 25}{25}=4$. Therefore, to have the cheapest transportation, 25 packages of the second type and 4 packages of the third type should be shipped.