8-4. There are 50 parking spaces on a parking lot, numbered from 1 to 50. Currently, all parking spaces are empty. Two cars, a black one and a pink one, have arrived at the parking lot. How many ways are there to park these cars such that there is at least one empty parking space between them?

If the black and pink cars switch places, this is considered a new way.

![](https://cdn.mathpix.com/cropped/2024_05_06_8b3efc685c220cbeb247g-2.jpg?height=462&width=1396&top_left_y=2079&top_left_x=336)
Answer: 2352.

Solution I. Carefully consider the cases of the placement of the black car. If it parks in spot number 1 or 50, the pink car can park in any of the 48 spots (numbered from 3 to 50 or from 1 to 48, respectively). If the black car parks in a spot numbered from 2 to 49, the pink car has only 47 options (all except the spot of the black car and the two adjacent spots). In total, there are $2 \cdot 48 + 48 \cdot 47 = 2352$ options.

Solution II. Count the number of options as a difference: from the total number of possible ways to arrange the two cars, subtract the "extra" - the number of ways in which they are adjacent.

In total, we have 50 $\cdot$ 49 options: for each of the 50 ways to choose a spot for the black car, there are 49 ways to choose a spot for the pink car. The number of options where the cars are adjacent is $49 \cdot 2$: for each of the 49 ways to choose two adjacent parking spots, there are 2 ways to park the cars.

Thus, the answer is $50 \cdot 49 - 49 \cdot 2 = 2352$.