There are equal numbers of black and white pieces. If you remove 30 black pieces and 18 white pieces, then the number of white pieces is 3 times that of black pieces. How many black and white chesses were there originally?
黑、白两色棋子个数相等．若把黑棋拿掉30个，白棋拿掉18个，这时白棋的个数是黑棋的3倍．黑棋和白棋原来各有几个？
<gadget id="calculator">30 - 18</gadget>
<output>12</output>

<gadget id="calculator">3 - 1</gadget>
<output>2</output>

<gadget id="calculator">12 / 2</gadget>
<output>6</output>

<gadget id="calculator">6 + 30</gadget>
<output>36</output>

<result>36</result>