This is a minimax optimization problem:
$$
\min_{p_i} \max_{i}\frac{w_i}{p_i}
$$
subject to
$$
\sum_{i=1}^{n}{w_i}=W.
$$
First consider the maximum between $\frac{w_i}{p_i}$ and $\frac{w_j}{p_j}$ and suppose that the sum of $w_i$ and $w_j$ is fixed. Minimum of the maximum of $\frac{w_i}{p_i}$ and $\frac{w_j}{p_j}$ is obtained for $ \frac{w_i}{p_i}=\frac{w_j}{p_j}$. To see this, suppose that the minimum of maximum is obtained for $ \frac{w_i}{p_i} > \frac{w_j}{p_j}$. Then you can always decrease $ \frac{w_i}{p_i}$ by $\delta>0$ and yet keeping it as maximum while the minimum of maximum is decreased.
Now suppose that the minimum of maximum is obtained by choosing $(w_1,...,w_n)$. If for $w_i$ and $w_j$, $\frac{w_i}{p_i}$ is not equal to $ \frac{w_j}{p_j}$. Suppose w.l.g. $\frac{w_i}{p_i} > \frac{w_j}{p_j}$. Then using same procedure as before, you can find a new sequence $(w_1,..,w_i-\delta,...,w_j+\delta,w_n)$ such that the minimum of maximum decreases or does not change.
Therefore the minimum of maximum is obtained for $\frac{w_i}{p_i} = \frac{w_j}{p_j}$ for all $i,j$ which gives the following solution:
$$
\displaystyle w_i=W\frac{p_i}{\displaystyle\sum_{j=1}^n p_j}
$$