Question 10
A magic number is a positive integer with distinct digits such that the difference between the number obtained by writing its digits in descending order and the number obtained by writing its digits in ascending order is equal to the positive integer itself. For example, 495 is a magic number since $954-459=495$. Find all four-digit magic numbers.