def find(n):
    if n % 2 == 0:
        return None
    k = 1
    while k < 10000:
        r = pow(10, k, n)
        if r == 1:
            return (10**k - 1) // n
        k += 1


for k in range(1, 200):
    r = find(k)
    if r is not None:
        print(k, r)

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: