Find two numbers $ a$ and $b $ such that the digits of $b$ are the same digits as $a$ in another order and the number $a - b$ has all the digits equal to $1$?
All I did was essentially just trial and error.
My solution:
$a=234567901$ $b=123456790$
Essentially, the main idea is that we know that most of the digits of $a$ would be $1$ more than the corresponding digits of $b$. Since $a$ and $b$ must use the same digits, we want to make $b$ something like $1234\ldots$, and $a$ would look like $2345\ldots$. From here, we adjust the last digits of $a$ and $b$ so that $a$ and $b$ have the same digits.
What would be a more elegant solution to this problem?