Python | Easy Understanding | While Loop | Brute Force | 1988ms)
```class Solution:\n    def smallestRepunitDivByK(self, K: int) -> int:\n        if K%2==0 or K%5==0:\n            return -1\n        i=1\n        c=1\n        
```class Solution:\n    def smallestRepunitDivByK(self, K: int) -> int:\n        if K%2==0 or K%5==0:\n            return -1\n        i=1\n        c=1\n        while True:\n            if i%K==0:\n                return c\n            i=10*i+1\n            c+=1\n#1*10+1=11, 11*10+1=111, 111*10+1=1111 .......
[]