#P1085. 求阶乘的和
求阶乘的和
题目描述
给定正整数n,求不大于n的正整数的阶乘的和,即:
[ S=1!+2!+3!+\cdots+n! ]
其中,(n!=1\times2\times3\times\cdots\times n)。
格式
输入
输入一行,包含一个正整数n(1<n<12)。
输出
输出一行,表示阶乘的和。
样例
输入
5
输出
153
给定正整数n,求不大于n的正整数的阶乘的和,即:
[ S=1!+2!+3!+\cdots+n! ]
其中,(n!=1\times2\times3\times\cdots\times n)。
输入一行,包含一个正整数n(1<n<12)。
输出一行,表示阶乘的和。
输入
5
输出
153
By signing up a XAZXOI universal account, you can submit code and join discussions in all online judging services provided by us.