2022 AIME I Problem 13

Let S be the set of all rational numbers that can be expressed as a repeating decimal in the form 0 . \overline{a b c d}, where at least one of the digits a, b, c, or d is nonzero. Let N be the number of distinct numerators obtained when numbers in S are written as fractions in lowest terms. For example, both 4 and 410 are counted among the distinct numerators for numbers in S because 0 . \overline{3636}=\frac{4}{11} and 0 . \overline{1230}=\frac{410}{3333}. Find the remainder when N is divided by 1000 .