Two boxes, A and B, are filled with candies respectively. It is known that there are 40 candies in box A, first take (1/4) from box B, and then take the rest (1/2) from box B. The total number of candies in A and B boxes is 50% of the total number of candies in the original two boxes. So how many candies are there in the two boxes A and B?
甲、乙两个盒子内分别装有糖果，已知甲盒内有40颗，先从乙盒内取走(1/4)，再从乙盒内取走余下的(1/2)，这时甲、乙两盒的糖果总数为原来两盒糖果总数的50%．则原来甲、乙两个盒子中的糖果共有多少颗．
<gadget id="calculator">50 / 100</gadget>
<output>1/2 = around 0.5</output>

<gadget id="calculator">40 * (1/2)</gadget>
<output>20</output>

<gadget id="calculator">1 / 4</gadget>
<output>1/4 = around 0.25</output>

<gadget id="calculator">1 / 2</gadget>
<output>1/2 = around 0.5</output>

<gadget id="calculator">(1/4) * (1/2)</gadget>
<output>1/8 = around 0.125</output>

<gadget id="calculator">(1/2) - (1/8) - (1/2)</gadget>
<output>-1/8 = around -0.125</output>

<gadget id="calculator">(1/4) + (-1/8)</gadget>
<output>1/8 = around 0.125</output>

<gadget id="calculator">20 / (1/8)</gadget>
<output>160</output>

<gadget id="calculator">160 + 40</gadget>
<output>200</output>

<result>200</result>