• + 2 comments
    import sys
    
    
    n = int(raw_input().strip())
    
    def fact(n):
        if(n==1):
            return 1
        prod=n*fact(n-1)
        return prod
    
    print fact(n)
    

    Simply forget that n is big. It's python :)