Cookies help us deliver our services. By using our services, you agree to our use of cookies. Click here to learn more

Interview Question

Sales and Trading Interview

What is the sum of 1-40?

Answer

Interview Answer

5 Answers

0

820

Interview Candidate on 11 Feb 2010
2

We can have the sum by using the following formula
N * (N + 1) / 2

So we have:
40 * (40 + 1) / 2 = 820

blue on 21 Mar 2010
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

Evandro on 30 Dec 2010
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

scienceguy on 11 Jan 2011
0

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

an87 on 13 Jun 2011

Add Answers or Comments

To comment on this, Sign In or Sign Up.