category-wise-problems

contains category wise problems(data structures, competitive) of popular platforms.

View the Project on GitHub mayankdutta/category-wise-problems

1015. Smallest Integer Divisible by K

Code implementation ```cpp class Solution { public: int smallestRepunitDivByK(int k) { if (k % 2 == 0 or k % 5 == 0) return -1; long long int num = 1; int ans = 1; if (num % k == 0) return ans; while (num) { num = num * 10 + 1; num %= k; ans ++; } return ans; } }; ```