19. A rectangular prism has integer length, width, and height, and its volume is exactly $2006 \mathrm{~cm}^{3}$. After painting its surface red, it is then cut into small cubes with edge lengths of $1 \mathrm{~cm}$. If there are 178 small cubes with three red faces, then the number of small cubes with exactly two red faces is _.
19.1824 .

From the problem, we know that one of the edges of the cuboid must be $1 \mathrm{~cm}$, otherwise, only 8 small cubes would have three faces painted red. Let's assume the length, width, and height of the cuboid are $x \mathrm{~cm}, y \mathrm{~cm}, 1 \mathrm{~cm}$, respectively. Then we have
$$
\left\{\begin{array}{l}
2(x-2)+2(y-2)=178, \\
x y=2006 .
\end{array} \text { Solving, we get } \left\{\begin{array}{l}
x=59, \\
y=34 .
\end{array}\right.\right.
$$

Therefore, the number of small cubes with exactly two faces painted red is
$$
(x-2)(y-2)=57 \times 32=1824 \text { (cubes). }
$$