Problem 4.8. If in the number 79777 the digit 9 is crossed out, the number 7777 is obtained. How many different five-digit numbers exist from which 7777 can be obtained by crossing out one digit?
Answer: 45.

Solution. Note that 77777 is one of such numbers. Next, we will consider five-digit numbers where to get 7777, we need to strike out a digit that is not 7.

If the first digit in the number is struck out, there are 8 options for it: $1,2,3,4,5,6,8,9$. If, however, the second, third, fourth, or fifth digit in the number is struck out, there are 9 options for it: $0,1,2,3,4,5,6,8,9$.

Obviously, all the corresponding numbers are distinct, and there are $1+8+9+9+9+9=45$ of them.

## 5th grade