import math


def approximate_parameters(T):
    """
    Creates L and k parameters from papers, based on how many iterations need to be
    performed, and how much memory should be used.
    """
    log_memory = math.log(10000000, 2)
    log_T = math.log(T, 2)
    L = 1
    if (log_T - log_memory > 0):
        L = math.ceil(pow(2, log_memory - 20))
    k = round(math.log(T / (10 * L), 2))
    return (L, k)