import math


def factors(n):
    """ Returns the list of n's factors
    --param
    n : int
    --return
    list
    """
    if n < 1:
        return []
    elif n in {1,2,3}:
        temp = set()
        temp.add(1)
        temp.add(n)
        return list(temp)
    else:
        temp = set()
        temp.add(1)
        temp.add(n)
        for i in range(2,math.floor(math.sqrt(n))+1):
            if n % i == 0:
                temp.add(i)
                temp.add(n//i)
        # end of for
        return list(temp)