1258: 求阶乘的和

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:35 Solved:15

Description

输入一个n,编写程序求1!+2!+3!+…+n!。 ( n小于10)

Input

一个数字n

Output

输出1!+2!+3!+…+n!的答案


Sample Input Copy

5

Sample Output Copy

153

HINT

1!+2!+3!+4!+5!=1!+1!x2+2!x3+3!x4 +4!x5      从这个式子里你能发现什么