Sobes.tech
Junior — Senior

Decomposition of length into even components

livecode

Task condition

Implement a function that takes an integer — length, and returns a list of all even numbers that form this length (decomposition into even parts). Example: for input 10, the function should return [6, 2, 4].

def even_parts(n: int) -> list[int]:
    # TODO
    pass
Decomposition of length into even components - Live… - sobes.tech