<s>[INST] What is the maximal value of the expression $\overline{abc}-(a^3+b^3+c^3)?$ Let $\overline{abc}$ be $3$-digits number. What is the maximal value of the expression $\overline{abc}-(a^3+b^3+c^3)?$
Computer gives the answer $396$ for the number $620$ but I have  no idea how to do it by hand.
 [/INST] You can write the whole thing as $100a + 10b + c - a^3 - b^3 - c^3$.
Rearranging the terms gives $(100a - a^3) + (10b - b^3) + (c - c^3)$, which you can solve one summand at a time:
You maximize $100a - a^3$ for $a = 6$.
You maximize $10b - b^3$ for $b = 2$.
You maximize $c - c^3$ for $c = 0$ or $1$.
</s>