def ffact(n):
    if n == 1:
        return 1
    else:
        return n*ffact(n-1)
def ffactfor(n):
    if n<= 0:
        return "bad",0
    else:
        ret = 1
        for i in range(1,n+1):
            ret *= i
        return "ok",ret
    
fact = lambda x: 1 if x==1  else x*fact(x-1)
from functools import reduce
from operator import mul
#factstd(n)= lambda n: reduce(mul,range(1,n+1))
def factr(n):
    return reduce(mul,range(1,n+1))

ll=[ffact,ffactfor,fact,factr]
for fonc in ll:
    print(fonc(10))
