A total of 50 juniors and seniors were given a mathematics test. The 35 juniors attained an average score of 80 while the 15 seniors attained an average of 70. What was the average score for all 50 students who took the test?

Alright, apparently I was wrong...

I thought you'd take both of the averages of the two groups and then divide by two but apparently that's wrong.

70+80=150/2=75. The correct answer, it says, is 77.