《程序设计基础二》第一阶段“类的设计部分“练习题目:1432--1446

Problem 1023. -- 阶乘的和

1023: 阶乘的和

Time Limit: 1 Sec  Memory Limit: 128 MB   64bit IO Format: %lld
Submitted: 5805  Accepted: 1830
[Submit][Status][Web Board]

Description

求Sn=1!+2!+3!+4!+5!+…+n!之值,其中n是一个数字。

Input

n(0 <= n <= 20)

Output

Sample Input

5

Sample Output

153

HINT

 use the type "long long" may help you.

[Submit][Status][Web Board]