A boat travels on the river. It travels 40 kilometers per hour in the first 3 hours, and travels a total of 112 kilometers in the next 3 hours. How many kilometers has the boat traveled in total?
一艘船在江上行驶，前3小时每小时行40千米，后3小时共行了112千米，这艘船一共行驶了多少千米？
<gadget id="calculator">3 * 40</gadget>
<output>120</output>

<gadget id="calculator">120 + 112</gadget>
<output>232</output>

<result>232</result>