We can have the sum by using the following formula

N * (N + 1) / 2

So we have:

40 * (40 + 1) / 2 = 820

5 Answers

▲

2

▼

We can have the sum by using the following formula

N * (N + 1) / 2

So we have:

40 * (40 + 1) / 2 = 820

▲

0

▼

Since he isn't asking to sum all the numbers from 1 to 40:

sum of 1 and 40 = 41

OR

sum of 1 + -40 = -39

▲

3

▼

Any sum like this is easy. take the lowest and highest... 1 +40 = 41, then the next highest and the next lowest. 2 + 39 = 41. Realize that there are 20 such pairs. 20 * 41 = 820.

For the numbers 1 - 100, 1 + 100 = 101, 2 + 99 = 101; there are 50 such pairs, so 50 * 101 = 5050

▲

0

▼

http://brainteaserbible.com/interview-brainteaser-sum-of-the-numbers-from-1-to-50

To comment on this, Sign In or Sign Up.

Would you like us to review something? Please describe the problem with this {0} and we will look into it.

Your feedback has been sent to the team and we'll look into it.

820