Easy Python Solution
\ndef smallestRepunitDivByK(self, k: int) -> int:\n        n=0\n        for i in range(1,k+1):\n            n=(n*10+1)%k\n            if not n: return i\n      
```\ndef smallestRepunitDivByK(self, k: int) -> int:\n        n=0\n        for i in range(1,k+1):\n            n=(n*10+1)%k\n            if not n: return i\n        return -1\n```
['Python', 'Python3']