Recently I was solving the problem which said that I have to find the smallest number consisting of only 1-s (1, 11, 111, ...) such that — that found number is divisible by the given number $$$n$$$ (at least for $$$<= 100 000$$$). This problem is easy, but I was surprised that it is possible for any $$$n$$$. How can I prove this?