During a summer vacation, it rained 7 times in the morning or afternoon. If it rained in the morning, it did not rain in the afternoon. In total, there were 5 rainless mornings and 6 rainless afternoons. How long did the vacation last?
Let $x$ be the number of rainy mornings. The number of rainy afternoons is $7-x$. Thus, the following table can be set up:

|  | number of mornings | number of afternoons |
| :--- | :---: | :---: |
| rainy | $x$ | $7-x$ |
| rain-free | 5 | 6 |
| total: | $x+5$ | $13-x$ |

We assume that the vacation contained as many mornings as afternoons, that is, $x+5=13-x$. From this, $x=4$ follows, and the duration of the vacation is $x+5=9$.

Of course, it is possible that the number of mornings does not match the number of afternoons. (For example, we arrive at the vacation spot only in the afternoon, and on the last day, we stay until the evening, or we arrive in the morning, but on the last day, we leave for home in the afternoon.) In this case, there is a difference of 1 between the number of mornings and afternoons.

$$
|x+5-(13-x)|=1
$$

that is,

Since $x$ is an integer, this is not possible.

Therefore, the vacation lasted 9 days.