The school bought a new batch of books. The ratio of comic books to science books is 3:5, and comic books are 240 fewer than science books. How many science books and comic books were bought?
学校新买一批图书，其中连环画与科技书本数的比是3：5，连环画比科技书少240本，科技书和连环画共买了多少本？
<gadget id="calculator">5 - 3</gadget>
<output>2</output>

<gadget id="calculator">240 / 2</gadget>
<output>120</output>

<gadget id="calculator">5 + 3</gadget>
<output>8</output>

<gadget id="calculator">120 * 8</gadget>
<output>960</output>

<result>960</result>