54. How many five-digit numbers are there in which

a) the digit 5 appears exactly once?

b) the digit 5 appears no more than once?

c) the digit 5 appears at least once?
54. a) The number of five-digit numbers where only the first digit is 5 is $1 \cdot 9 \cdot 9 \cdot 9 \cdot 9=9^{4}$. The number of five-digit numbers where only the second (third, fourth, fifth) digit is 5 is $8 \cdot 9^{3}$. Therefore, the total number of required five-digit numbers is $9^{4}+4 \cdot 8 \cdot 9^{3}=41 \cdot 9^{3}$.

b) If we add the number of five-digit numbers that do not contain the digit 5 (see problem 35) to the number of five-digit numbers that have exactly one digit 5 (see problem 54 a), we get the number of five-digit numbers in which the digit 5 appears no more than once: $8 \cdot 9^{4}+41 \cdot 9^{3}=113 \cdot 9^{3}$.

c) If we subtract the number of five-digit numbers that do not contain the digit 5 (see problem 35) from the total number of five-digit numbers, we get the number of five-digit numbers that contain at least one digit 5: $9 \cdot 10^{4}-8 \cdot 9^{4}=37512$.