how many digits are required to number a book containing 250 pages?  Choose the correct option.
A) 756  B) 642  C) 492  D) 372  E) 250
<gadget id="calculator">10 - 1</gadget>
<output>9</output>

<gadget id="calculator">9 * 10</gadget>
<output>90</output>

<gadget id="calculator">90 * 2</gadget>
<output>180</output>

<gadget id="calculator">9 + 180</gadget>
<output>189</output>

<gadget id="calculator">250 - 100</gadget>
<output>150</output>

<gadget id="calculator">150 + 1</gadget>
<output>151</output>

<gadget id="calculator">151 * 3</gadget>
<output>453</output>

<gadget id="calculator">189 + 453</gadget>
<output>642</output>

<result>B</result>
how many digits are required to number a book containing 250 pages?
add(add(subtract(const_10, const_1), multiply(multiply(subtract(const_10, const_1), const_10), const_2)), multiply(add(subtract(250, const_100), const_1), const_3))
"9 pages from 1 to 9 will require 9 digits . 90 pages from 10 to 99 will require 90 * 2 = 180 digits . 250 - ( 90 + 9 ) = 151 pages will require 151 * 3 = 453 digits . the total number of digits is 9 + 180 + 453 = 642 . the answer is b ."