Hi,
I'm a newbie to SPOJ system. I try to solve the problem Factorial. My code is run successfully in ideone.com but got runtime error((NZEC) in SPOJ. I don't know the reason. Could you suggest me the difference between 2 systems.
Here is my code:
def divide_by_5(n):
if n%5 !=0:
return 0
return 1+ divide_by_5(n/5)
numtestcase = int(raw_input())
L = []
for numcase in range(numtestcase):
num = int(raw_input())
L.append(num)
for elem in L:
z = 0
for j in range(5,elem+1,5):
z += divide_by_5(j)
print z
Thanks,