Factorial!#271

Factorial! (Editorial)

Written By : MathModel

We can use Python in order to compute large factorials , however we should set maximum digits in string of integer after certain operations , setting will be more than enough in order to pass.

Complexity will be .

import sys
sys.set_int_max_str_digits(10**5)

fact=[ 1,1]
for i in range(2,3001):
    fact.append(fact[-1]*i)
print(fact[int(input())])