Solution (source code)

= Solution

Let $A_d$ contain the multiples of $d$ among $1,\ldots,999$. Its <cardinality> is $\lfloor999/d\rfloor$, using the <floor function>. Because $3,7,11$ are pairwise <coprime>, their pairwise intersections correspond to divisibility by $21,33,77$, and their triple intersection to divisibility by $231$. The <inclusion-exclusion principle> gives
$$
\boxed{333+142+90-47-30-12+4=480.}
$$