Question 5
For any positive integer $n$, we define the function $f(n)$ to be the sum of the digits of $n$ and the number of digits of $n$. For example, $f(218)=2+1+8+3=14$. (Note: The first digit of $n$, reading from left to right, cannot be 0). What is the sum of maximum and minimum values of $n$ such that $f(n)=6$?