Problem 5.8. In the country, there are 100 cities: 30 of them are located in the mountainous part of the country, and 70 are in the plain. Over three years, air routes were established between the cities. Each year, 50 new air routes were opened in the country: all cities were randomly divided into 50 pairs, and a route was opened between the cities in the same pair. After three years, it turned out that out of the 150 routes opened, exactly 21 connect pairs of "mountainous" cities. How many routes connect pairs of "plain" cities?
# Answer: 81.

Solution. Each flight has two ends (two cities it connects). Moreover, after three years, each city is the end of exactly three flights.

In the "mountain" cities, flights have a total of $30 \cdot 3=90$ ends. Among these, 21 flights connect two "mountain" cities. Each such flight between "mountain" cities has two ends, so each of these flights is counted twice. The remaining $90-2 \cdot 21=48$ are the ends of flights that start from "mountain" cities and lead to "plain" cities. Therefore, there are exactly 48 flights between "mountain" and "plain" cities.

Now let's consider the ends of flights that start from "plain" cities. There are a total of $70 \cdot 3=$ 210 ends, but as we have already determined, 48 of these are the ends of flights leading to "mountain" cities. Therefore, the flights between two "plain" cities have $210-48=162$ ends. Each such flight has two ends, so the answer to the problem is $162: 2=$ 81.

## 6th grade