1132: 阶乘求和1!+2!+3!+4!+5!+…+n!(循环结构练习)
[Creator : ]
Description
求Sn=1!+2!+3!+4!+5!+…+n!之值,其中n是一个数字。
(有多组输入数据)
(有多组输入数据)
Input
n(n≤20)
Output
和
Sample Input Copy
5
Sample Output Copy
153
HINT
注意:0的阶乘是1(不懂百度qwq)
while(scanf("%d",&a)!=EOF)
while(scanf("%d",&a)!=EOF)