A boy wrote successive whole numbers starting from 1 up to 800. In doing so, how many times did he write the digit 8?
(a) 160
(b) 161
(c) 152
(d) 260
Sol:
In line ⊣ 8, 18, 28, —- 98 = 10 × 8 = 80
In line ⊣ 80, 81, 82, ——89 ⇒ 10 × 8 = 80
And Iine 800 = 1
⇒ 80 + 80 + 1 = 161