Why can't you solve this probability problem in this way? Daphne is visited periodically by her three best friends: Alice, Beatrix, and Claire. Alice visits every third day, Beatrix visits every fourth day, and Claire visits every fifth day. All three friends visited Daphne yesterday. How many days of the next 365-day period will exactly two friends visit her?

This is how I tried to solve it.
Alice and Beatrix will visit together every $LCM(3,4) == 12$ days.
Alice and Claire will visit together every $LCM(3,5) == 15$ days.
Beatrix and Claire will visit together every $LCM(4,5) == 20$ days.
Thus the number times these occur in 365 days is $\left\lfloor \frac{365}{12} \right\rfloor\; +\; \left\lfloor \frac{365}{15} \right\rfloor\; +\; \left\lfloor \frac{365}{20} \right\rfloor\; == 72$

The answer seems to be $54$ though. Why is this?
 A: There are $\left\lfloor \frac{365}{60} \right\rfloor = 6$ days that all three friends visit. You are currently counting these days three times (all three pairs of friends visit), while they should not be counted at all. So you have to subtract $6 \cdot 3 = 18$ from your answer, which gives the correct answer $72 - 18 = 54$.
A: This solution uses the Principle of Inclusion and Exclusion.
It's very convenient that their names follow the first three letters of the alphabet, so I'll just call them A, B, and C $\ddot\smile$

Here's what you figured out:


*

*A and B visit together every $12$ days

*B and C visit together every $20$ days

*A and C visit together every $15$ days


This is the expression you calculated, by adding the number of times each pair of friends visits per year: $$\left\lfloor \frac{365}{12}\right\rfloor + \left\lfloor \frac{365}{20}\right\rfloor + \left\lfloor \frac{365}{15}\right\rfloor = 72$$
However, this counts the times when all three of the friends meet three times each. The question asks for how many times exactly two friends visit.
How often to all three visit together? A, B, and C meet every $\text{lcm}(3,4,5) = 3 \cdot 4 \cdot 5 = 60$ days. Thus, the three friends meet exactly $$\left\lfloor \frac{365}{60}\right\rfloor = 6$$ times each year.
Since you've counted these six meetings three times each, we need to subtract $6 \cdot 3$ from our earlier answer, for a final total of $$\left\lfloor \frac{365}{12}\right\rfloor + \left\lfloor \frac{365}{20}\right\rfloor + \left\lfloor \frac{365}{15}\right\rfloor - 3 \left\lfloor \frac{365}{60}\right\rfloor = 72 - 18 = \boxed{54}$$
