fork download
  1. def factorial(n):
  2. def f(n):
  3. if n == 0:
  4. return 1
  5. else:
  6. return n * f(n - 1)
  7.  
  8. if isinstance(n, int) and n >= 0:
  9. return f(n)
  10. else:
  11. return None
  12.  
  13. print(factorial(100))
Success #stdin #stdout 0.02s 5744KB
stdin
Standard input is empty
stdout
93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000