Math Problem : GGG.5 Sum total of every number of each digit

Answer the following questions.

(1) In the integers from one to 999, there are some integers whose sum total of the number of each digit is 5.


Find the sum total which added all of those integers.

(2) In the integers from one to 9999, there are some integers whose sum total of the number of each digit is 5.


Find the sum total which added all of those integers.













Answer
(1) 3885
(2) 77770