python recursion factorial | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

python recursion factorial

# cook your dish here def fact(z): if z==1: return 1 else: return z*fact(z-1) for i in range(int(input())): n = int(input()) print(fact(n)) this question is from codechef to calculate factorial plz tell me why am i getting a runtime error time limit = 1 sec source limit =50000 bytes

11th Aug 2019, 4:20 AM
I Am Anushka
1 Answer
19th May 2020, 7:51 AM
Raghu Vamsi Yaram
Raghu Vamsi Yaram - avatar