Given an integer K, find the length of the smallest positive integer made only of digit 1 that is divisible by K. Return -1 if no such number exists.
K = positive integer
length of the smallest repunit divisible by K, or -1
Example 1:
Input:
K = 1
Output:
1
Explanation:
1 is divisible by 1.
Example 2:
Input:
K = 3
Output:
3
Explanation:
111 is divisible by 3.