Students from Class 1, Grade 3 prepared gifts for Children's Day for some children in Yushu. They planned to buy a schoolbag and some school supplies for each child. The teacher led the students to the supermarket to buy gifts. The unit prices of known gifts are: schoolbag 60 yuan, textbook 12 yuan, pencil case 8 yuan. The students brought a total of 800 yuan, and the teacher brought 200 yuan. After buying 50 gifts, the money was just spent. It is known that the number of textbooks and pencil cases purchased is the same. May I ask: How much did they spend on textbooks?
三年级1班的同学们为玉树的一些小朋友们准备六•一儿童节的礼物，他们准备给每个小朋友买一个书包和一些学习用品．老师带领同学们到超市买礼物．已知礼物的单价分别为：书包60元，课本12元，笔袋8元．同学们一共带了800元钱，老师带了200元钱，买完50件礼物后钱正好花完，已知购买的课本和笔袋数量相同．请问：他们购买课本共花了多少元钱．
<gadget id="calculator">3_000 - 1_000</gadget>
<output>2_000</output>

<gadget id="calculator">120 - 12 - 8</gadget>
<output>100</output>

<gadget id="calculator">2_000 / 100</gadget>
<output>20</output>

<gadget id="calculator">12 * 20</gadget>
<output>240</output>

<result>240</result>