solved extra long factorials hackerrank
Signed-off-by: ayham <altffour@protonmail.com>
This commit is contained in:
parent
6aed86732b
commit
053f8296ad
|
@ -0,0 +1,21 @@
|
||||||
|
#!/bin/python3
|
||||||
|
|
||||||
|
import math
|
||||||
|
import os
|
||||||
|
import random
|
||||||
|
import re
|
||||||
|
import sys
|
||||||
|
|
||||||
|
def fact(num):
|
||||||
|
res = 1
|
||||||
|
for i in range(num, 1, -1):
|
||||||
|
res = res * i;
|
||||||
|
return res;
|
||||||
|
|
||||||
|
def extraLongFactorials(n):
|
||||||
|
print(fact(n))
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
n = int(input().strip())
|
||||||
|
extraLongFactorials(n)
|
Loading…
Reference in New Issue