from functools import reduce
import itertools


def day01(input_data, n_for_combination):
    """
    From the input list, find the [n_for_combination] entries that sum to 2020
    and multiply them together.

    Args:
        input_data [list] : python list of integers
        n_for_combination [int] : length of subsequences in combinations of elements in <input_data>
    """
    return reduce(
        lambda x, y: x * y,
        list(
            filter(
                lambda x: sum(x) == 2020,
                itertools.combinations(input_data, n_for_combination),
            )
        )[0],
    )