Efficient Solution using modulo-arithmetic: Consider Only (1, 3, 7, 9) as unit digit->
We know that the number with unit digit of 0, 2, 4, 5, 6, 8  never gives least significant digit as 1 so we have to return -1 in these cases. \nonly we have to 
We know that the number with **unit digit of 0, 2, 4, 5, 6, 8  never gives least significant digit as 1 so we have to return -1** in these cases. \nonly we have to consider the number whith least significant digit **1, 3, 7, 9.**\nTry to under stand the problem by spliting it in least significant digit as 1, 3, 7, 9.\nthen only go to Solution part.\nand if you like this approach then **please upvote it.**\n\n\n```\nclass Solution {\npublic:\n    int smallestRepunitDivByK(int k) \n    {\n        if(k%10==1 || k%10==3 || k%10==7 || k%10==9)\n        {\n          int x=0, count=0;\n            while(1)\n            {\n                count++;\n                x=((10 * x)%k +1 )%k;\n                if(!x)return count;\n            }\n        }\n        \n        return -1;\n    }\n};\n```\n\n\n\n
['C']