2 problems found
If \(x\) is a positive integer, the value of the function \(\mathrm{d}(x)\) is the sum of the digits of \(x\) in base 10. For example, \(\mathrm{d}(249) = 2 + 4 + 9 = 15\). An \(n\)-digit positive integer \(x\) is written in the form \(\displaystyle\sum_{r=0}^{n-1} a_r \times 10^r\), where \(0 \leqslant a_r \leqslant 9\) for all \(0 \leqslant r \leqslant n-1\) and \(a_{n-1} > 0\).
Solution: