You are viewing a single comment's thread. Return to all comments →
In fact, you can also get rid of one of the sums in the loop and use just two variables out of the three. You can obtain the other as N - (n1 + n2).
Just replace 1 and 2 with either from P,N or Z as you prefer :).