2021/18.py
def reduce_split(pair):
    """
    To split a regular number, replace it with a pair; the left element of the
    pair should be the regular number divided by two and rounded down, while the
    right element of the pair should be the regular number divided by two and
    rounded up. For example, 10 becomes [5,5], 11 becomes [5,6], 12 becomes
    [6,6], and so on.
    """
    if isinstance(pair, int):
        if pair >= 10:
            return [math.floor(pair / 2), math.ceil(pair / 2)]
        return pair
    split_l = reduce_split(pair[0])
    if split_l != pair[0]:
        return [split_l, pair[1]]
    else:
        return [split_l, reduce_split(pair[1])]

    To split a regular number, replace it with a pair; the left element of the
    pair should be the regular number divided by two and rounded down, while the
    right element of the pair should be the regular number divided by two and
    rounded up. For example, 10 becomes [5,5], 11 becomes [5,6], 12 becomes
    [6,6], and so on.
    
To split a regular number, replace it with a pair; the left element of the
pair should be the regular number divided by two and rounded down, while the
right element of the pair should be the regular number divided by two and
rounded up.
To split a regular number replace it with a pair ; the left element of the pair should be the regular number divided by two and rounded down while the right element of the pair should be the regular number divided by two and rounded up .
def reduce_split(pair):
    if isinstance(pair, int):
        if pair >= 10:
            return [math.floor(pair / 2), math.ceil(pair / 2)]
        return pair
    split_l = reduce_split(pair[0])
    if split_l != pair[0]:
        return [split_l, pair[1]]
    else:
        return [split_l, reduce_split(pair[1])]
def reduce_split ( pair ) : if isinstance ( pair , int ) : if pair >= 10 : return [ math . floor ( pair / 2 ) , math . ceil ( pair / 2 ) ] return pair split_l = reduce_split ( pair [ 0 ] ) if split_l != pair [ 0 ] : return [ split_l , pair [ 1 ] ] else : return [ split_l , reduce_split ( pair [ 1 ] ) ]
To split a regular number, replace it with a pair; the left element of the
pair should be the regular number divided by two and rounded down, while the
right element of the pair should be the regular number divided by two and
rounded up.
To split a regular number replace it with a pair ; the left element of the pair should be the regular number divided by two and rounded down while the right element of the pair should be the regular number divided by two and rounded up .
"""
    To split a regular number, replace it with a pair; the left element of the
    pair should be the regular number divided by two and rounded down, while the
    right element of the pair should be the regular number divided by two and
    rounded up. For example, 10 becomes [5,5], 11 becomes [5,6], 12 becomes
    [6,6], and so on.
    """
pair