3. What is the maximum value of the difference between a three-digit number and the sum of the cubes of its digits? What kind of three-digit number can achieve this maximum value? What is the smallest positive value of this difference?
Consider any three-digit number $\overline{\mathrm{bbc}}$, and let
$$
f(\overline{a b c})=\overline{a b c}-\left(a^{3}+b^{3}+c^{3}\right)
$$

Then $f(\overline{a b c})=100 a+10 b+c-\left(a^{3}+b^{3}\right.$
$$
\begin{aligned}
+ & \left.c^{3}\right) \\
= & \left(100 a-a^{3}\right)+\left(10 b-b^{3}\right) \\
& +\left(c-c^{3}\right) \\
= & f_{1}(a)+f_{2}(b)+f_{3}(c) .
\end{aligned}
$$

where $\hat{i}_{1}(a)=100 \mathrm{a}-\mathrm{a}^{3}, \mathrm{f}_{2}(\mathrm{~b})=10 \mathrm{~b}$
$$
-\hat{b}^{3}, f_{3}(c)=c - c^{3} \text{. When and only when } f_{1}(a) \text{, }
$$
$\left.f_{2}(b): f_{3}(c)\right)$ take their maximum values, $f(\overline{(a b c})$ takes the maximum value. Since $f_{1}(1)=99, f_{1}(2)=192$,
$$
\begin{array}{l}
f_{1}(3)=273, f_{1}(4)=336, f_{1}(5)=375, \\
f_{1}(6)=384, f_{1}(7)=357, f_{1}(8)=288, \\
f_{1}(9)=171 .
\end{array}
$$

Therefore, when $a=b$, $f_{1}(a)$ takes the maximum value of 384.
Similarly, it can be found that:
$b=2$ when $f_{2}(b)$ takes the maximum value of 12;
$c=0$ or 1 when $f_{3}(c)$ takes the maximum value of 0.
Thus, when $\overline{\mathrm{abc}}=620$ or 621, $\mathrm{f}(\overline{\mathrm{abc}})$ takes the maximum value of $384+12+0=396$.

Furthermore, $f_{1}(a)=99 a+\left(a-a^{3}\right)=99 a-(a-1) \cdot a \cdot(a+1)$;
$\mathrm{f}_{2}(\mathrm{~b})=9 \mathrm{~b}+\left(\mathrm{b}-\mathrm{b}^{3}\right)=9 \mathrm{~b}-(\mathrm{b}-1) \cdot b \cdot(b+1)$;
$f_{3}(c)=(c-1) \cdot c \cdot(c+1)$.
Since the product of two consecutive integers is divisible by 3, $f_{1}(a)$, $f_{2}(b)$, and $f_{3}(c)$ are all divisible by 3, thus $\mathrm{f}(\overline{\mathrm{abc}})$ is also divisible by 3. Therefore, the smallest positive value of $\overline{\mathrm{abc}}-\left(\mathrm{a}^{3}+\mathrm{b}^{3}+\mathrm{c}^{3}\right)$ is no less than 3, and in fact, 3 is the minimum value.

It is recommended that readers verify: $\mathrm{f}(437)=\mathrm{f}(474)=f(856)=3$.