From a French 2016 puzzle and math contest, where no calculator is allowed
Using each of the digits $0,1,2,3,4,5,6,7,8,9$ exactly once, find two five-digit integers such that their product is maximal
The contest lasts $3$ hours and this is problem $12$, out of $18$.
I can't an time-efficient approach to solve this.
An obvious requirement is that in each number, the digits come in decreasing order (from left to right). Consequently, the greatest number starts with $9$, and the smallest ends with $0$.
Let $N_1 = 10^4 x_1 + 10^3 x_2 + \cdots x_5$ and $N_2 = 10^4y_1 + \cdots +y_5$. Since $N_1\times N_2 = 10^8 x_1y_1+\cdots$, it is clear that $x_1 = 9, y_1 = 8$. Now, we have \begin{align*} N_1 &= 90000 + 10^3x_2 + \cdots \\ N_2 &= 80000 + 10^3y_2 + \cdots \\ N_1\times N2 &= 72\cdot 10^8 + 10^7(9y_2+8x_2) + 10^6x_2y_2 \cdots \end{align*} To maximize the product, we need to maximize $9y_2+8x_2$. The obvious candidates are $x_2 = 7, y_2 = 6$ and $x_2 = 6, y_2 = 7$. Since $9 \cdot 6 + 8 \cdot 7 = 110$ and $9 \cdot 7 + 8 \cdot 6 = 111$, we choose $x_2 = 6, y_2 = 7$. The numbers so far are $96000 + 10^2x_3+\cdots$ and $87000+10^2y_3+\cdots$. Now we need to maximize $96y_3+87x_3$. The possibilities are $x_3 = 5, y_3 = 4$ or $x_3 = 4, y_3 = 5$. In these cases, $96y_3+87x_3$ has values 819 and 828 respectively. Thus we choose $y_3 = 5, x_3 = 4$. Now we have \begin{align*} N_1 &= 96400 + 10^2x_4 + \cdots \\ N_2 &= 87500 + 10^2y_4 + \cdots \end{align*} Now we need to maximize $964 y_1 + 875 x_4$. Here we see that $x_4 = 2$ and $y_4 = 3$. Finally, we have \begin{align*} N_1 &= 96420 + x_5 \\ N_2 &= 87530 + y_5 \end{align*} Now to maximize $9642 y_5 + 8753 x_5$, clearly $y_5 = 1$ and $x_5 = 0$. Thus the required numbers are $96420$ and $87531$ and the maximum product is $8439739020$.