MOST EFFICIENT METHOD USING COMBINATORIX
As Bunuel said, think of each number as XXX ie 001 to 999
Numbers with one 7.
Either 7XX, X7X or XX7, so 3 x 1C9 x 1C9 = 3x9x9 = 243
Numbers with two 7's (nb question asks how many sevens are displayed, so this answer must be doubled)
Either 77X, 7X7 or X77, so 3x 1C9 = 27 (or 54 once you double it)
Numbers with three 7's
Only 1 (777). Triple it as there are three 7,s = 3
Add all together: 243+54+3 = 300
Answer => D
If you find my post helpful, please GIVE ME SOME KUDOS!