# What is the sum of 1+2+3+4+5+6+7+8+9+1234567890+9876543210+99999999+(0xx9001)-9999999+(-999999999)?

## I want to know

Jun 28, 2016

$211111145$

#### Explanation:

This is a test to see if you spot thing and give you practice of splitting your solution up into smaller parts.
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Consider $1 + 2 + \ldots + 8 + 9$

Take the outermost values and pair them then work your way in.

$9 + 1 = 10$
$8 + 2 = 10$
$7 + 3 = 10$
$6 + 4 = 10$
Then there is 5

$\textcolor{b l u e}{\implies 4 \times 10 + 5 = 45}$
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Consider $1234567890 + 9876543210$

Write as
$\text{ } 1234567890$
ul(" "9876543210+
$\textcolor{w h i t e}{.} 1 1111111100$

So the questions sum from the left to this point is:

$\textcolor{b l u e}{45 + 1111111100 + \ldots +}$
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Consider $+ 99999999 + \left(0 \times 9001\right) - 9999999$

$0 \times 9001 = 0$ so we can totally forget about that as it is part of addition so has no effect.

So now we have

$99999999$
$\underline{\textcolor{w h i t e}{9} 9999999} \text{ "larr" this is a negative value} \implies S u b t r a c t$
$90000000$

So the questions sum from the left to this point is:

$\textcolor{b l u e}{45 + 1111111100 + 90000000 + \ldots +}$
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Consider the last value $+ \left(- 999999999\right)$

Plus and minus together like this make a minus so we have

So the questions sum from the left to this point is:

$45 + 1111111100 + 90000000 - 999999999$

So the last two numbers can be written as
$\textcolor{w h i t e}{9} 90000000$
$\underline{999999999} \leftarrow \text{ negative value => subtract}$

There are different ways of dealing with this. This is just one way

$999999999 \leftarrow \text{Negative value}$
$\underline{\textcolor{w h i t e}{9} 90000000} \leftarrow \text{Positve value but subtract it}$
$900000000 \leftarrow \text{Negative answer}$

So the questions sum from the left to this point is:

$\textcolor{b l u e}{45 + 1111111100 - 900000000}$
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Consider the last two from the previous part solution

$+ 1111111100 - 900000000$

$1111111100$
$\underline{\textcolor{w h i t e}{1} 900000000} \leftarrow \text{ negative value so subtract}$
$\textcolor{w h i t e}{0} 211111100$

color(blue)(45+211111100color(green)(= 211111145)