Let $S$ be the set of positive integers $n$ for which $\frac1n$ has the repeating decimal representation $0.\overline{abc}$ with $a$, $b$, $c$ three different digits. What is the sum of the elements of $S$?
$n\cdot\underline{a}\,\underline{b}\,\underline{c}=999=3^3\cdot37$, so $n\in\{3,9,27,37,111,333,999\}$.
$\frac13=0.\overline{333}$, $\frac19=0.\overline{111}$, $\frac1{111}=0.\overline{009}$, $\frac1{333}=0.\overline{003}$, $\frac1{999}=0.\overline{001}$ have repeated digits; $\frac1{27}=0.\overline{037}$ and $\frac1{37}=0.\overline{027}$ do not.