I bought a lottery ticket, the sum of the digits of its five-digit number turned out to be equal to the age of my neighbor. Determine the number of this ticket, given that my neighbor solved this problem without difficulty.

#
Notice, there cannot be two unequal digits in the ticket.

## Solution

The ticket number is 99999. If there were at least two unequal digits in the ticket, they could be swapped, and the neighbor would not be able to solve the problem for sure. If all digits are equal but less than 9, there is always a possibility to increase one digit by 1 and decrease another, meaning there is an additional solution. Only in the case where the neighbor is 45 years old and the ticket number is 99999, the solution is unique.

## Answer

The ticket number is 99999.