18. It is known that hexadecimal numbers are composed of the digits $0 \sim 9$ and the letters $\mathrm{A}$ to $\mathrm{F}$, where $\mathrm{A}, \mathrm{B}, \cdots, \mathrm{F}$ represent $10,11, \cdots, 15$ respectively. Among the first 1000 positive integers, find all hexadecimal numbers that are represented using only digits. Determine the number of these numbers, $n$, and the sum of the digits of $n$ is ( ).
(A) 17
(B) 18
(C) 19
(D) 20
(E) 21