Car A and car B leave from Shanghai and Nanjing at the same time. After 3.1 hours, car A meets car B at a distance of 12.4 km beyond the midpoint. Car A travels an average of 54km per hour, how many kilometers is the distance between Shanghai and Nanjing?
甲、乙两辆汽车同时从上海和南京相对开出，经过3.1小时后，甲车在超过中点12.4km处与乙车相遇．甲车平均每小时行54km，求上海和南京相距多少千米．
<gadget id="calculator">54 * 3.1</gadget>
<output>167.4</output>

<gadget id="calculator">167.4 - 12.4</gadget>
<output>155</output>

<gadget id="calculator">155 * 2</gadget>
<output>310</output>

<result>310</result>