Task 1. A building has three floors. On the second and third floors, 20 people live, and on the first and second floors, 22 people live. How many people in total live in the building, if the number of people living on the second floor is equal to the total number of people living on the first and third floors?
Solution. Let $P, V$ and $T$ denote the number of people living on the first, second, and third floor, respectively. From the condition of the problem, we have $P+V=22, V+T=20$, so $P+V+V+T=42$. However, $P+T=V$, so
therefore $3 V=42$, from which we find $V=14$. Finally, from $P+V=22$ it follows that $P=8$, and from $V+T=20$ it follows that $T=6$.