# n! = n*(n-1)!   5! = 5*4*3*2*1

def fact_rec(n):
    if n==0 or n==1:
        return 1
    return n * fact_rec(n-1)

def fact_iter(n):
    fact = 1
    for i in range(2,n+1):
        fact*=i
    return fact

if __name__ == '__main__':
    print(fact_iter(5))
a538527157c8a90292b49c45cef2bd42caf89fa7
<mask token>

def fact_rec(n):
    if n == 0 or n == 1:
        return 1
    return n * fact_rec(n - 1)


<mask token>

def fact_rec(n):
    if n == 0 or n == 1:
        return 1
    return n * fact_rec(n - 1)


def fact_iter(n):
    fact = 1
    for i in range(2, n + 1):
        fact *= i
    return fact


<mask token>

def fact_rec(n):
    if n == 0 or n == 1:
        return 1
    return n * fact_rec(n - 1)


def fact_iter(n):
    fact = 1
    for i in range(2, n + 1):
        fact *= i
    return fact


if __name__ == '__main__':
    print(fact_iter(5))

# n! = n*(n-1)!   5! = 5*4*3*2*1

def fact_rec(n):
    if n==0 or n==1:
        return 1
    return n * fact_rec(n-1)

def fact_iter(n):
    fact = 1
    for i in range(2,n+1):
        fact*=i
    return fact

if __name__ == '__main__':
    print(fact_iter(5))