A professor wishes to make up a true-false exam with n questions. She assumes that she can design the problems in such a way that a student will answer the jth problem correctly with probability $p_j$ , and that the answers to the various problems may be considered independent experiments. Let $S_n$ be the number of problems that a student will get correct. The professor wishes to choose $p_j$ so that $E(S_n) = 0.7n$ and so that the variance of $S_n$ is as large as possible. Show that, to achieve this, she should choose $p_j = .7 $ for all j; that is, she should make all the problems have the same difficulty.
I found the expected value and variance of $S_n$ below
$E(S_n) = \sum_{j = 1}^{n}p_j=0.7n$
$Var(X_j)=E(X_j^2)-E(X_j)^2=p_j-p_j^2$
$Var(S_n)= \sum_{j = 1}^{n}p_j-p_j^2=0.7n-\sum_{j = 1}^{n} p_j^2$
If this line is reasoning is correct I think I need to next show that $p_j=0.7$ for all $p_j$ minimises $\sum_{j = 1}^{n} p_j^2$, but I'm not sure how.
Note that $$ \sum_{j=1}^n p_j\leq \sqrt{n}\sqrt{\sum_{j=1}^n p_j^2} $$ so $$ \sum p_j^2\geq\left(\sum_{j=1}^n p_j\right)^2\biggr/n=0.7^2n $$ by the Cauchy Schwarz inequality with equality achieved iff $p_j=0.7$ by the equality conditions of Cauchy Schwarz.