SAMPLE INPUT
4
1
2
5
3
SAMPLE OUTPUT
1
2
120
6












Solution


def fact(n):
if n==1:
return 1;
else:
return n*fact(n-1);
t=int(input())
i=0
while i<t:
n=int(input())
print (fact(n))
i=i+1







if you have any problem in this code, take a screenshot and contact with Rishabh Chaubey.
Previous Post Next Post