the sum of all the digits of the integers from 18 to 21 inclusive is 24 ( 1 + 8 + 1 + 9 + 2 + 0 + 2 + 1 = 24 ) . what is the sum w of all the digits of the integers from 0 to 99 inclusive ?
"we want the sum of the digits from 0 to 99 , so i approximated : 0 - 9 - > 45 - > ( 9 + 0 ) * 10 / 2 40 - 49 - > 85 ( 13 + 4 ) * 10 / 2 90 - 99 - > 135 ( 18 + 9 ) * 10 / 2 we can see at a glance that theweightgoes up as the numbers go up ( meaning the difference between 85 and 45 is 40 , while 135 - 85 is 50 , this means that the second part of this sequence carries more weight for our result ) , so we know that the final answer has to be more than 850 ( 85 * 10 ) but close to it , and that ' s just w = 900 : the answer is c ."
multiply(divide(multiply(9, add(9, 1)), 2), multiply(2, const_10))