def least_divisible_repunit(divisor: int) -> int:
    """
    Return the least value k such that the Repunit of length k is divisible by divisor.
    >>> least_divisible_repunit(7)
    6
    >>> least_divisible_repunit(41)
    5
    >>> least_divisible_repunit(1234567)
    34020
    """
    if divisor % 5 == 0 or divisor % 2 == 0:
        return 0
    repunit = 1
    repunit_index = 1
    while repunit:
        repunit = (10 * repunit + 1) % divisor
        repunit_index += 1
    return repunit_index