Created
November 28, 2019 20:33
-
-
Save chak10/e8f838f00ff92a14a0a59f171965fde2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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