The function \(S(n)\) is defined for positive integers \(n\) by \[S(n) = \text{sum of the digits of }n.\] For example, \(S(723) = 7+2+3=12\). The sum \[S(1) + S(2) + S(3) + \dots + S(99)\] equals
\(746\),
\(862\),
\(900\),
\(924\).
Approach 1
We can lay out the digits we have to add in a table and then add up each column.
\(0+0\) | \(0+1\) | \(0+2\) | \(0+3\) | \(\dots\) | \(0+9\) |
\(1+0\) | \(1+1\) | \(1+2\) | \(1+3\) | \(\dots\) | \(1+9\) |
\(2+0\) | \(2+1\) | \(2+2\) | \(2+3\) | \(\dots\) | \(2+9\) |
\(\dots\) | \(\dots\) | \(\dots\) | \(\dots\) | \(\dots\) | \(\dots\) |
\(9+0\) | \(9+1\) | \(9+2\) | \(9+3\) | \(\dots\) | \(9+9\) |
\(1+2+\dots+9=45\) | \(45+10\times1\) | \(45+10\times2\) | \(45+10\times3\) | \(\dots\) | \(45+10\times9\) |
Adding up the column totals we have \[45\times10 + 10\times1 + 10\times2 +\dots+10\times9 = 45\times10+10\times45 = 900\] so the answer is (c).
Approach 2
Since zeroes do not contribute to the sum, we can rewrite this as \[S(1) + S(2) + S(3) + \dots + S(99) = S(00) + S(01) + \dots + S(99).\]
Then in the \(100\) two-digit numbers \(00, \dots, 99\), each digit \(0,\dots ,9\) appears \(20\) times (\(10\) times as the first digit, \(10\) times as the second).
So \[S(1) + S(2) + S(3) + \dots + S(99) = 20 \times (0 + 1 + \dots + 9) = 20 \times 10 \times \frac{(0 + 9)}{2} = 900,\] and the answer is (c).