@@ -0,0 +1,553 @@
+public class Solution %7B%0A  public int divide(int dividend, int divisor) %7B%0A    if (divisor == 0 %7C%7C dividend == Integer.MIN_VALUE && divisor == -1) return Integer.MAX_VALUE;%0A    boolean positive = dividend %3E 0 && divisor %3E 0 %7C%7C dividend %3C 0 && divisor %3C 0;%0A    long a = Math.abs((long) dividend);%0A    long b = Math.abs((long) divisor);%0A%0A    int res = 0;%0A    while (a %3E= b) %7B%0A      long tmp = b, i = 1;%0A      while (a %3E= (tmp %3C%3C 1)) %7B%0A        tmp %3C%3C= 1;%0A        i %3C%3C= 1;%0A      %7D%0A      a -= tmp;%0A      res += i;%0A    %7D%0A    return positive ? res : -res;%0A  %7D%0A%7D%0A

add solution