python 3 easy to understand
\nclass Solution:\n    def smallestRepunitDivByK(self, K: int) -> int:\n        if K%2==0 or K%5==0:\n            return -1\n        start=1\n        while star
```\nclass Solution:\n    def smallestRepunitDivByK(self, K: int) -> int:\n        if K%2==0 or K%5==0:\n            return -1\n        start=1\n        while start%K!=0:\n            start=start*10+1\n        return len(str(start))\n```
[]