🔥Easiest & Best Solution in 5 Lines 💯
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity: O(k)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: O(1)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\nPlssssss Up Vote! -> \uD83D\uDE2D\n# Code\n```\nclass Solution {\n    public int smallestRepunitDivByK(int k) {\n        int remainder = 0;\n        for (int length_N = 1; length_N <= k; length_N++) {\n            remainder = (remainder * 10 + 1) % k;\n            if (remainder == 0) return length_N;\n        }\n        return -1;\n    }\n}\n```
['Java']