To complete a project alone, team A needs 20 days, and team B needs 30 days. After a few days of cooperation between teams A and B, team B is called out for another task. This project takes 18 days to complete. How many days did teams A and B work together?
单独完成一项工程，甲队需20天，乙队需30天，在甲、乙两队合作若干天后，乙队另有任务被调出，这项工程前后共用18天完成．甲、乙两队合作了多少天？
<gadget id="calculator">1 / 20</gadget>
<output>1/20 = around 0.05</output>

<gadget id="calculator">(1/20) * 18</gadget>
<output>9/10 = around 0.9</output>

<gadget id="calculator">1 - (9/10)</gadget>
<output>1/10 = around 0.1</output>

<gadget id="calculator">1 / 30</gadget>
<output>1/30 = around 0.033333</output>

<gadget id="calculator">(1/10) / (1/30)</gadget>
<output>3</output>

<result>3</result>