✅💯🔥Simple Code🚀📌|| 🔥✔️Easy to understand🎯 || 🎓🧠Beats 100%🔥|| Beginner friendly💀💯
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:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\n//           //////////////////ATISHAY\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\           \\\\\n//           \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\JAIN//////////////////           \\\\\nclass Solution {\n    public int smallestRepunitDivByK(int k) {\n        if (k%2==0 || k%5==0){\n            return -1;\n        }\n        int ans = 0;\n        for (int n=1; n<=k; n++) {\n            ans = (ans*10+1)%k;\n            if (ans==0){\n                return n;\n            }\n        }\n        return -1;\n    }\n}\n```\n![7be995b4-0cf4-4fa3-b48b-8086738ea4ba_1699897744.9062278.jpeg](https://assets.leetcode.com/users/images/fe5117c9-43b1-4ec8-8979-20c4c7f78d98_1721303757.4674635.jpeg)
['Hash Table', 'Math', 'C', 'Python', 'C++', 'Java']