There is a certain amount of sugar in container A, and several kilograms of water in container B. First, take out 8 kg of sugar from container A and put it into container B. After stirring evenly, pour 30 kg of sugar water from container B into container A. After the container is evenly stirred, the mass fraction of sugar water in container A is 40%, and the mass fraction of sugar water in container B is 20%. How many kilograms of sugar is in container A?
甲甲容器中装有一定数量的糖，乙容器中装有若干千克水，先从甲容器中取出8千克糖放入乙容器，搅拌均匀后，又将乙容器中的糖水倒30千克到甲容器，搅拌均匀后，甲容器中糖水质量的分数为40%，乙容器中糖水的质量分数为20%，甲容器中原有糖多少千克？
<gadget id="calculator">20 / 100</gadget>
<output>1/5 = around 0.2</output>

<gadget id="calculator">8 / (1/5)</gadget>
<output>40</output>

<gadget id="calculator">30 / 40</gadget>
<output>3/4 = around 0.75</output>

<gadget id="calculator">8 * (3/4)</gadget>
<output>6</output>

<gadget id="calculator">30 - 6</gadget>
<output>24</output>

<gadget id="calculator">40 / 100</gadget>
<output>2/5 = around 0.4</output>

<gadget id="calculator">1 - (2/5)</gadget>
<output>3/5 = around 0.6</output>

<gadget id="calculator">24 / (3/5)</gadget>
<output>40</output>

<gadget id="calculator">40 - 30</gadget>
<output>10</output>

<gadget id="calculator">10 + 8</gadget>
<output>18</output>

<result>18</result>