1188: 求阶乘的和

Memory Limit:32 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:51 Solved:23

Description

输入一个整数n,计算1!+2!+3!+...+n!

Input

输入一个整数n

Output

一个整数,前1~n的阶乘的和

Sample Input Copy

3

Sample Output Copy

9

HINT

n是正整数,0<n<11

Source/Category