Evaluate
1 + 2 + 3 + ⋯ + 9 9 8 + 9 9 9 + 1 0 0 0 .
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
multiply the last number and the number succeeding it, and then divide the product by two................!
1+2+3+4...............+1000
=1+1000+2+999+3+998........................
=1001+1001+1001.................(500 Times)
= 5 0 0 5 0 0
The answer is 2 1 0 0 0 × 1 0 0 1 = 5 0 0 × 1 0 0 1 = 5 0 0 5 0 0 .
Use the given formula n(n-1),consider that n is 1001,since the pattern is 1000+1 so equal to 1001(1001-1)=1001(1000)=1001000/2=500500
Using ROOT
void j(){ int s = 0; for (int i=1;i<1001;i++){ s = s+i; } cout<<s<<'\n'; }
1+1000=1001, 2+999=1001 until 500+501=1001 1001 times 500 is 500500
Good. That's the observation which allows us to sum up an arithmetic progression really quickly.
S(1000)=(1000/2) (1000+1)=500 1001=5005*100=500500
Problem Loading...
Note Loading...
Set Loading...
1 + 2 + 3 + ⋯ + 9 9 8 + 9 9 9 + 1 0 0 0 = 2 1 0 0 0 × 1 0 0 1 = 5 0 0 5 0 0 .