def prob(i, rs, bs): # i: int, rs: [num], bs: [num]:
# I not know if the elems in rs are integers, neither positives
# I apply abs in rs elems and compare with equals and less
if i <= 0:
return 1
return (1 / i) * sum(b * prop(i - abs(r)) for (r, b) in zip(rs, bs))