Skip to content

Instantly share code, notes, and snippets.

@chak10
Created November 28, 2019 20:33
Show Gist options
  • Save chak10/e8f838f00ff92a14a0a59f171965fde2 to your computer and use it in GitHub Desktop.
Save chak10/e8f838f00ff92a14a0a59f171965fde2 to your computer and use it in GitHub Desktop.
from decimal import *
n = 1e4
def factorial(n):
fact = 1
for i in range(1, int(n) + 1):
fact = fact * i
return fact
print("{:.2e}".format(Decimal(factorial(n))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment