Pages

Bangladeshi Blog

Friday, January 14, 2011

11. Factorial

Code:
tc = int(raw_input()) 

while tc: 
    num = int(raw_input()) 
    count = 0 
    while num >= 5: 
        count += num / 5 
        num /= 5 

    tc -= 1 
     
    print count
Be Pythonic

No comments:

Post a Comment