Input

4
1
2
5
3
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 screen shot and contact with Rishabh Chaubey.

Post a Comment

Previous Post Next Post