Question 13
In a town festival, there is a horse parade event where all of the horses were assigned numbers starting from 1, 2, 3, …. Ria took part in the event and rode the horse which has the largest sum of the digits from all the assigned numbers. If the total number of digits used in numbering the horses is 2022, then what is the number of the horse that Ria rode?