def decode(minterm,n_variables):
    """
    输入最小项编号，输出最小项的01串
    :param minterm: 待转化成string的
    :param n_variables: 变元数量
    :return: 最小项的01串
    :rtype: str
    """
    result=['0']*n_variables
    for i in reversed(range(n_variables)):
        result[i]=str(minterm%2)
        minterm=minterm//2
    return ''.join(result)