Hints: Spring
Answer to Hint 1: Alice visits $\lfloor m/a \rfloor$ times. Similarly, Bob $\lfloor m/b \rfloor$, Carol $\lfloor m/c \rfloor$. Call these $c_a$, $c_b$, $c_c$.
But the water rule depends on how many people visit on a given day. So you need, for each day, whether 1, 2, or 3 people visit. How do you count days with exactly one visitor? Exactly two? All three?
Answer to Hint 2: Use inclusion–exclusion. Days when at least Alice and Bob visit = multiples of $\mathrm{lcm}(a,b)$ in $[1,m]$, i.e. $\lfloor m / \mathrm{lcm}(a,b) \rfloor$. Similarly for (B,C) and (C,A). Days when all three visit = $\lfloor m / \mathrm{lcm}(a,b,c) \rfloor$.
To get “exactly two”: take pairwise counts and subtract the “all three” count so that days with all three are not counted in “exactly two.”
Answer to Hint 4: Now assign liters. A day with only one visitor gives that person 6 L. A day with exactly two visitors gives each 3 L. A day with all three gives each 2 L.
So: Alice’s total = (days only Alice) $\times 6$ + (days Alice and one other) $\times 3$ + (days all three) $\times 2$. Same for Bob and Carol.