```
class Solution(object):
def divide(self, dividend, divisor):
if divisor == 0:
return -1
mark = ''
if dividend >= 0 and divisor < 0 or dividend <= 0 and divisor > 0:
mark = '-'
i = 0
a = abs(dividend)
b = abs(divisor)
while a - b >= 0:
a = a - b
i += 1
return int(mark + str(i))
```

I browsed some answers and found they did it using similar method. But why do I get TLE all the time? Any better solutions?