0ms || 100%faster || CPP || Logical || Only take care of higher numbers via modulus
\nclass Solution {\npublic:\n    int smallestRepunitDivByK(int k) {\n        if(k%2==0 || k%5==0) return -1;\n       long long int s=1,pp=0,cnt=0;\n        whil
```\nclass Solution {\npublic:\n    int smallestRepunitDivByK(int k) {\n        if(k%2==0 || k%5==0) return -1;\n       long long int s=1,pp=0,cnt=0;\n        while(s){\n           pp=(pp*10)%k+1;\n           if(pp%k==0) return cnt+1;\n           cnt++;\n        }\n        return -1;\n    }\n};\n```
['C++']