package leetcode;

/**
 * https://leetcode.com/problems/smallest-integer-divisible-by-k/
 */
public class Problem1015 {
    public int smallestRepunitDivByK(int K) {
        // TODO
        return 0;
    }

    public static void main(String[] args) {
        Problem1015 prob = new Problem1015();
    }
}

@@ -171,24 +171,51 @@
     
-// TODO%0A
+if (K %25 2 == 0 %7C%7C K %25 5 == 0) %7B%0A   
         
 retu
@@ -214,114 +214,219 @@
     
+ 
 return 
-0;%0A
+-1;%0A    
     %7D%0A
-%0A
     
-public static void main(String%5B%5D args) %7B%0A        Problem1015 prob = new Problem1015()
+    int r = 1;%0A        for (int i = 1; i %3C= K; i++) %7B%0A            if (r %25 K == 0) %7B%0A                return i;%0A            %7D%0A            r = (r * 10 + 1) %25 K;%0A        %7D%0A        return -1
 ;%0A  

Solve problem 1015