As can be seen from the above figure, the score corresponding to 40+37 = 77 is 22%.
We can know that the number of B is: 77 ÷ 22% = 350 (the number).
The number of A is: 350× 78% = 273 (this number).