From 3a1747253b47d8f69bf90659079d863602da3fa0 Mon Sep 17 00:00:00 2001 From: itika-j <82488066+itika-j@users.noreply.github.com> Date: Mon, 25 Oct 2021 18:44:00 +0530 Subject: [PATCH] Created Solution.py Solution in python for exta long factorial --- .../Extra Long Factorials/solution.py | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Algorithms/Implementation/Extra Long Factorials/solution.py diff --git a/Algorithms/Implementation/Extra Long Factorials/solution.py b/Algorithms/Implementation/Extra Long Factorials/solution.py new file mode 100644 index 0000000..f8d4c1d --- /dev/null +++ b/Algorithms/Implementation/Extra Long Factorials/solution.py @@ -0,0 +1,26 @@ +#!/bin/python3 + +import math +import os +import random +import re +import sys + +# +# Complete the 'extraLongFactorials' function below. +# +# The function accepts INTEGER n as parameter. +# + +def extraLongFactorials(n): + # Write your code here + fact = 1 + + for i in range(1,n+1): + fact*=i + print(fact) + +if __name__ == '__main__': + n = int(input().strip()) + + extraLongFactorials(n)