1581: 【c12】阶乘之和▅

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:21 Solved:14

Description

求:1! + 2! + 3! +...+ 10!

先自定义函数求n的阶乘。

再用for循环求阶乘之和就可以了。

Input

输入一个正整数n,n <= 10;

Output

求1~n的阶乘之和并输出。

Sample Input Copy

3

Sample Output Copy

9