I am getting TLE for following python code:

```
class Solution:
# @param A : integer
# @return an integer
def factorial(self,n):
fact = 1
while n > 1:
fact *= n
n -= 1
return fact
def trailingZeroes(self, A):
fact = self.factorial(A)
counter = 0
while True:
if fact % 10 == 0:
counter += 1
fact //= 10
else:
break
return counter
```

for the input 9980. In my local machine it runs in 01.122321 time. Is that too slow for interviewbit?