C++ || 100% FAST || CLEAN CODE
```\nclass Solution {\npublic:\n    int smallestRepunitDivByK(int k) {\n        //  edge case\n        \n         if(k % 2 == 0 || k % 5 == 0)  return -1;\n    
```\nclass Solution {\npublic:\n    int smallestRepunitDivByK(int k) {\n        //  edge case\n        \n         if(k % 2 == 0 || k % 5 == 0)  return -1;\n         \n        int n = 1;\n        int len = 1;\n        \n        while(n % k !=0 ){\n            n = (n * 10 + 1) % k;\n            len++;\n        }\n        \n        return len;\n    }\n};
['Math', 'C']