#P267. 【基础】求1!+2!+3!+4!+...+n!

【基础】求1!+2!+3!+4!+...+n!

Description

请求出1!+2!+3!+4!+...+n!,请注意,n<=50。 n!=nx(n-1)x(n-2)x...x1,如:5!=5x4x3x2x1=120。

Input Format

请输入一个整数n(n<=50)

Output Format

输出求和的结果

10
4037913

Source

高精度算法