def __lowerCAmelCase			(							UpperCamelCase__    )     ->   str:
    return "".join([hex(UpperCamelCase__    )[2:].zfill(2    ).upper() for byte in list(UpperCamelCase__    )]    )






def __lowerCAmelCase			(							UpperCamelCase__    )     ->   bytes:
    # Check data validity, following RFC3548
    # https://www.ietf.org/rfc/rfc3548.txt
    if (len(UpperCamelCase__    ) % 2) != 0:
        raise ValueError(
            '''Base16 encoded data is invalid:
Data does not have an even number of hex digits.'''    )
    # Check the character set - the standard base16 alphabet
    # is uppercase according to RFC3548 section 6
    if not set(UpperCamelCase__    ) <= set('''0123456789ABCDEF'''    ):
        raise ValueError(
            '''Base16 encoded data is invalid:
Data is not uppercase hex or it contains invalid characters.'''    )
    # For every two hexadecimal digits (= a byte), turn it into an integer.
    # Then, string the result together into bytes, and return it.
    return bytes(int(data[i] + data[i + 1]    ,  16    ) for i in range(0    ,  len(UpperCamelCase__    )    ,  2    )    )


if __name__ == "__main__":
  import doctest

  doctest.testmod()

'''simple docstring'''




from bisect import bisect
from itertools import accumulate






def __lowerCAmelCase			(							UpperCamelCase__    ,  UpperCamelCase__    ,  UpperCamelCase__    ,  UpperCamelCase__    )     ->   str:
    __lowerCamelCase          =  sorted(zip(UpperCamelCase__    ,  UpperCamelCase__    )    ,  key=lambda UpperCamelCase__    : x[0] / x[1]    ,  reverse=UpperCamelCase__    )
    __lowerCamelCase     ,  __lowerCamelCase          =  [i[0] for i in r], [i[1] for i in r]
    __lowerCamelCase          =  list(accumulate(UpperCamelCase__    )    )
    __lowerCamelCase          =  bisect(UpperCamelCase__    ,  UpperCamelCase__    )
    return (
        0
        if k == 0
        else sum(vl[:k]    ) + (w - acc[k - 1]) * (vl[k]) / (wt[k])
        if k != n
        else sum(vl[:k]    )
    )


if __name__ == "__main__":
  import doctest

  doctest.testmod()
