Let \( r \) represent the total number of residents surveyed. According to the problem, two-fifths of the respondents said they like spending their vacation at the beach, and this number corresponds to 80 residents. This relationship can be represented by the following equation:
\[ \frac{2}{5}r = 80 \]
To find the total number of residents \( r \) surveyed, we can solve the equation.
- Multiply both sides by \( \frac{5}{2} \) to isolate \( r \):
\[ r = 80 \times \frac{5}{2} \]
- Calculate the right side:
\[ r = 80 \times 2.5 = 200 \]
Thus, the total number of residents surveyed is \( \boxed{200} \).