1. A cuboid with dimensions $m \times n \times p$ ($m, n, p$ are natural numbers) is composed of $m n p$ unit cubes. Each unit cube is associated with a real number. For every square with dimensions $m \times 1 \times 1$ or $1 \times n \times 1$ or $1 \times 1 \times p$, composed of unit cubes, it holds that: the numbers associated with the unit cubes of these cuboids, taken in order, form an arithmetic progression. The sum of the numbers associated with the cubes at the vertices of the original cuboid is equal to $a$. Determine the sum of all the numbers associated with the unit cubes.
Solution. First, let's examine the numbers associated with the lower layer of the cuboid. They are:

$$
\left[\begin{array}{cccc}
a_{11}^{(1)} & a_{12}^{(1)} & \ldots & a_{1 n}^{(1)} \\
a_{21}^{(1)} & a_{22}^{(1)} & \ldots & a_{2 n}^{(1)} \\
\ldots & \ldots & \ldots & \ldots \\
a_{m 1}^{(1)} & a_{m 2}^{(1)} & \ldots & a_{m n}^{(1)}
\end{array}\right]
$$

For the sum of the numbers in the $i$-th row, we have

$$
A_{i}=\frac{n}{2}\left(a_{i 1}^{(1)}+a_{i n}^{(1)}\right)
$$

and for the sum of all numbers in the lower layer, we have:

$$
\begin{aligned}
N_{1}=\sum_{i=1}^{m} A_{i} & =\frac{n}{2}\left(a_{11}^{(1)}+a_{21}^{(1)}+a_{m 1}^{(1)}+a_{1 n}^{(1)}+a_{2 n}^{(1)}+\ldots+a_{m n}^{(1)}\right) \\
& =\frac{n}{2} \cdot \frac{m}{2}\left(a_{11}^{(1)}+a_{m 1}^{(1)}+a_{1 n}^{(1)}+a_{m n}^{(1)}\right)
\end{aligned}
$$

Similarly, for the sum of the numbers associated with the $k$-th layer, we get

$$
N_{1}=\frac{n}{2} \cdot \frac{m}{2}\left(a_{11}^{(k)}+a_{m 1}^{(k)}+a_{1 n}^{(k)}+a_{m n}^{(k)}\right)
$$

and for the sum of all numbers associated with the cuboid, we get

$$
\begin{aligned}
\sum_{i=1}^{p} N_{i}= & \frac{m n}{4}\left(a_{11}^{(1)}+a_{11}^{(2)}+\ldots+a_{11}^{(p)}+a_{m 1}^{(1)}+a_{m 1}^{(2)}+\ldots+a_{m 1}^{(p)}+\right. \\
& \left.\quad+a_{1 n}^{(1)}+a_{1 n}^{(2)}+\ldots+a_{1 n}^{(p)}+a_{m n}^{(1)}+a_{m n}^{(2)}+\ldots+a_{m n}^{(p)}\right) \\
= & \frac{m n p}{8}\left(a_{11}^{(1)}+a_{m 1}^{(1)}+a_{1 n}^{(1)}+a_{m n}^{(1)}+a_{11}^{(p)}+a_{m 1}^{(p)}+a_{1 n}^{(p)}+a_{m n}^{(p)}\right) \\
= & \frac{m n p a}{8}
\end{aligned}
$$