cdefexternfrom"math.h":doublec_lgamma"lgamma"(double)doublec_exp"exp"(double)defexp(n):"""Return e**n."""returnc_exp(n)deflfactorial(n):"""Return an estimate of the log factorial of n."""returnc_lgamma(n+1)deffactorial(n):"""Return an estimate of the factorial of n."""returnc_exp(c_lgamma(n+1))if__name__=="__main__":importsysiflen(sys.argv)!=2:sys.stderr.write("USAGE: %s n\nPrints n!.\n"%sys.argv[0])sys.exit(1)n=map(float,sys.argv[1:])printfactorial(n)