def stretch(n: int, w: int):
    r = scaleRange(n, 0, (len(w) - 0.1))
    val = []
    idx = [math.floor(x) for x in r]
    for x in range(0, n):
        index = int(idx[x])
        val.append(w[index])
    val = (val / np.sum(val))
    return val
def stretch(n: int, w: int):
    r = scaleRange(n, 0, (len(w) - 0.1))
    val = []
    idx = [math.floor(x) for x in r]
    for x in range(0, n):
        index = int(idx[x])
        val.append(w[index])
    val = (val / np.sum(val))
    return val