2018 WUSTACM 新生交流群:829055498

Problem 1023. -- 阶乘的和

1023: 阶乘的和

Time Limit: 1 Sec  Memory Limit: 128 MB   64bit IO Format: %lld
Submitted: 3585  Accepted: 1083
[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]