The sports team from another school bought 9 basketballs and 9 footballs each. The basketballs were 38 yuan each, and the soccer balls were 49 yuan each. How much did the school spend on buying footballs and basketballs?
外校体育组买回篮球和足球各9个，篮球每个38元，足球每个49元，学校买足球和篮球共用了多少钱？
<gadget id="calculator">38 + 49</gadget>
<output>87</output>

<gadget id="calculator">87 * 9</gadget>
<output>783</output>

<result>783</result>