A hint: For given $r_i\in ]0,1[$ consider the function $f(x):=\sum_{i=1}^n r_i^x$ and see what happens for $x\to 0$ resp. $x\to\infty$.
My response to the comments:
One has $f(0)=n>1$ and $\lim_{x\to\infty} f(x)=0$; furthermore $f$ is monotonically decreasing, so there is exactly one $x>0$ with $f(x)=1$. Unless all $r_i$ are equal (and maybe in some other special cases) it is not possible to solve the equation $f(x)=1$ explicitly. For a numerical solution assume $r_1\leq r_2\leq\ldots\leq r_n$ and put $a:={\log n\over \log(1/r_1)},\qquad b:={\log n\over \log(1/r_n)}.$ Then $f(a)\geq 1$ and $f(b)\leq 1$. Now use binary search.