rates for having a manuscript typed at a certain typing service are $ 5 per page for the first time a page is typed and $ 2 per page each time a page is revised. if a certain manuscript has 100 pages, of which 40 were revised only once, 10 were revised twice, and the rest required no revisions, what was the total cost of having the manuscript typed?  Choose the correct choice from the following answers:
A) $ 430	B) $ 620	C) $ 650	D) $ 680	E) $ 770
<gadget id="calculator">100 * 5</gadget>
<output>500</output>

<gadget id="calculator">40 * 2</gadget>
<output>80</output>

<gadget id="calculator">500 + 80</gadget>
<output>580</output>

<gadget id="calculator">10 * 2</gadget>
<output>20</output>

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

<gadget id="calculator">580 + 40</gadget>
<output>620</output>

<result>B</result>
rates for having a manuscript typed at a certain typing service are $ 5 per page for the first time a page is typed and $ 2 per page each time a page is revised. if a certain manuscript has 100 pages, of which 40 were revised only once, 10 were revised twice, and the rest required no revisions, what was the total cost of having the manuscript typed?
add(add(multiply(100, 5), multiply(40, 2)), multiply(multiply(10, 2), const_2))
"for 100 - 40 - 10 = 50 pages only cost is 5 $ per page for the first time page is typed - 50 * 5 = 250 $ ; for 40 pages the cost is : first time 5 $ + 2 $ of the first revision - 40 * ( 5 + 2 ) = 280 $ ; for 10 pages the cost is : first time 5 $ + 2 $ of the first revision + 2 $ of the second revision - 10 ( 5 + 2 + 2 ) = 90 $ ; total : 250 + 280 + 90 = 620 $ . answer : b ."