# Problem Description
The task involves manipulating a list of binary numbers represented as strings. The manipulation process includes converting each binary number to its decimal equivalent, then truncating the last `cut_len` digits from this decimal number, and finally converting the truncated decimal number back to its binary form. The goal is to return a list of these processed binary numbers in their decimal form.

# Visual Facts
1. **Example 1**:
   - **Input Binary Numbers**: ["1110000", "11110001", "1111111101", "101"]
   - **Cut Length**: 2
   - **Intermediate Decimal Conversion**: [112, 241, 1021, 5]
   - **Truncated Decimal Numbers**: [1, 2, 10, 0]
   - **Output**: [1, 2, 10, 0]

2. **Example 2**:
   - **Input Binary Numbers**: ["111011", "1000001", "10101", "1010111", "100101"]
   - **Cut Length**: 1
   - **Intermediate Decimal Conversion**: [59, 65, 21, 87, 37]
   - **Truncated Decimal Numbers**: [5, 6, 2, 8, 3]
   - **Output**: [5, 6, 2, 8, 3]

# Visual Patterns
1. **Binary to Decimal Conversion**: Each binary number is first converted to its decimal equivalent.
2. **Truncation Process**:
   - The last `cut_len` digits of the decimal number are removed.
   - This can be achieved by integer division of the decimal number by 10^{\text{cut_len}}.
3. **Output**: The truncated decimal numbers are collected into a list and returned as the final output.


# Solution
from typing import List

def solution(nums: List[str], cut_len: int) -> List[int]:
    """
    Manipulates a list of binary numbers using a specified cut length.

    Parameters:
        nums (List[str]): The input list of binary numbers to process. The binary numbers are represented as strings, e.g. "1010".
        cut_len (int): The value used for cutting.

    Returns:
        List[int]: The processed list after applying the cut operation.
    """
    # convert binary strings to integers
    new_nums = [int(num, 2)// 10**cut_len for num in nums]

    
    return new_nums


# Test Script
def test():
    test_cases = [
        (['1110000', "11110001", " 1111111101", "101"],2, [1,2,10,0]),
        (["111011", "1000001", "10101", "1010111", "100101"],1,[5,6,2,8,3]),
        (['11101', '10001111', '10000', '11011001', '1101011', '101101100', '111111', '11100110', '11100101'], 3 , [0, 0, 0, 0, 0, 0, 0, 0, 0]),
        (['110111000', '100001101', '110000010', '111101001', '110101010', '10110111', '100011000', '110001110'], 2 , [4, 2, 3, 4, 4, 1, 2, 3]),
        (['100100010', '1011011', '101110', '11010001', '11', '10010011', '11111101'], 2 , [2, 0, 0, 2, 0, 1, 2]),
        (['100000010', '110101010', '100011010', '100101', '1101', '100001001', '11111001', '110111111', '11000', '110110110'], 2 , [2, 4, 2, 0, 0, 2, 2, 4, 0, 4]),
        (['11010100', '100111100', '110111011', '101100010', '101111111', '110011', '111001000', '101010001'], 1 , [21, 31, 44, 35, 38, 5, 45, 33]),
        (['10111100', '101100110', '10001101', '111101011', '11110000'], 4 , [0, 0, 0, 0, 0]),
        (['1001', '100000111', '11111100', '111011', '110010001', '101010000'], 3 , [0, 0, 0, 0, 0, 0]),
        (['110110111', '111100000', '110011110', '1010110', '1110111', '101010', '100111100', '1010001', '100110100'], 1 , [43, 48, 41, 8, 11, 4, 31, 8, 30]),
                
    ]
    def equal_arr(arr1, arr2):
        return arr1 == arr2

    for nums, cut_len, expected_output in test_cases:
        try:
            output = solution(nums, cut_len)
        except Exception as e:
            error_message = (
                f"An exception occurred while running the test case:\n"
                f"`nums`: {nums}\n" 
                f"`cut_len`: {cut_len}\n\n"
                f"Exception: '{str(e)}'"
            )
            assert False, error_message

        if not equal_arr(output, expected_output):
            error_message = (
                f"The following Test Case failed:\n"
                f"`nums`: {nums}\n"
                f"`cut_len`: {cut_len}\n\n"
                f"Actual Output: {output}\n"
                f"Expected Output: {expected_output}"
            )
            assert False, error_message

test()