A = 9 + 99 + 999 + ... + 999..99 (2019 chữ số 9)
Tổng tất cả các chữ số của A là:
B = 9 + 9 x 2 + 9 x 3 + 9 x 2019
B = 9 x (1 + 2 + 3+ ... + 2019)
B = 9 x (2019 + 1)x[(2019 - 1) : 1 + 1] : 2
B = 18352710
999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999