The experimental primary school bought 12 basketballs and 8 footballs. The basketballs are 45.8 yuan each, and the footballs are 40.5 yuan each. How much does it cost in total?
实验小学买来12个篮球和8个足球，篮球每个45.8元，足球每个40.5元，一共要用多少钱？
<gadget id="calculator">45.8 * 12</gadget>
<output>549.6</output>

<gadget id="calculator">40.5 * 8</gadget>
<output>324</output>

<gadget id="calculator">549.6 + 324</gadget>
<output>873.6</output>

<result>873.6</result>