Python Easy Solution
```\nclass Solution:\n    def smallestRepunitDivByK(self, k: int) -> int:\n        if k%2==0 or k%5==0: return -1\n        i=0\n        d=1\n        while i<=10
```\nclass Solution:\n    def smallestRepunitDivByK(self, k: int) -> int:\n        if k%2==0 or k%5==0: return -1\n        i=0\n        d=1\n        while i<=100000:\n            if d%k==0:\n                return i+1\n            d=(d*10)+1\n            i+=1\n        return -1\n        \n            \n
[]