COUNTRY MEDALS
A 126+9+40
B 126+9
C 126
The simplest of arithmetic
Your description states Country C won 126 total medals. A better wording might have said, Countries A, B, and C won total of 126 medals. Then the table might be like this:
A c+9+c+40
B c+9
C c
Total 126
Still, just the simplest of arithmetic.