AMC 10A 2015 Problem 18

Hexadecimal (base-16) numbers are written using the numeric digits 0 through 9 as well as the letters A through F to represent 10 through 15 . Among the first 1000 positive integers, there are n whose hexadecimal representation contains only numeric digits. What is the sum of the digits of n ?

Answer Choices
A. 17
B. 18
C. 19
D. 20
E. 21