A and B bought 24 cups and spent the same amount of money. A took 16 and B took 8. In this way, A has to give B 40 yuan. How much is each cup?
甲乙两人买24个杯子花了同样多的钱，甲拿了16个，乙拿了8个，这样甲要给乙40元，问每个杯子多少钱？
<gadget id="calculator">24 / 2</gadget>
<output>12</output>

<gadget id="calculator">16 - 12</gadget>
<output>4</output>

<gadget id="calculator">40 / 4</gadget>
<output>10</output>

<result>10</result>