We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.

Why are u using extra space that is list and then calculating maximum of that. You can simply calculate the factorial by directly multiplying factorial variable with decreasing n
Here it is:

## Extra Long Factorials

You are viewing a single comment's thread. Return to all comments →

My code for python3 was literally just:

But it was fun nonetheless.

O so there is even a factorial function in python...haha I didn't now. I coded a function separately for that...thanks for the info.

i was doing the same...then i recalled

ha ha i used recursion.

i also didnt knew that there is a factorial function in python

## ye dekh bhai python solution

n=int(input())

if n==1: print("1") else: k=n g=[] i=1

Why are u using extra space that is list and then calculating maximum of that. You can simply calculate the factorial by directly multiplying factorial variable with decreasing n Here it is: