求101到999之间所有偶数的和。
已知
要求
我们需要找到101到999之间所有
解答
101到999之间的偶数为\( 102,104,106, \ldots, 998 \)。
这是一个等差数列。
其中,
\( a=102 \) 且 \( d=104-102=2 \) \( l=998 \)
我们知道,
$l=a+(n-1) d$
$\Rightarrow 998=102+(n-1) \times 2$
$\Rightarrow 998=102+2n-2$
$\Rightarrow 998-100=2n$
$\Rightarrow n=\frac{898}{2}=449$
$\therefore n=449$
$\mathrm{S}_{n}=\frac{n}{2}[2 a+(n-1) d]$
$=\frac{449}{2}[2 \times 102+(449-1) \times 2]$
$=\frac{449}{2}[204+448 \times 2]$
$=\frac{449}{2}(1100)$
$=449 \times 550$
$=246950$
101到999之间所有偶数的和是246950。
广告
数据结构
网络
关系数据库管理系统 (RDBMS)
操作系统
Java
iOS
HTML
CSS
Android
Python
C语言编程
C++
C#
MongoDB
MySQL
Javascript
PHP