Problem

Source: RMO 2018 P3

Tags: algebra, combinatorics



For a rational number $r$, its *period* is the length of the smallest repeating block in its decimal expansion. for example, the number $r=0.123123123...$ has period $3$. If $S$ denotes the set of all rational numbers of the form $r=\overline{abcdefgh}$ having period $8$, find the sum of all elements in $S$.