#include <stdio.h>
int nFun(int n)//求階乘
{
if (n<=0)
{
return 0;
}
int nCount = 1;
for (int i=1; i<=n; i++)
{
nCount *= i;
}
return nCount;
}
void main()
{
int n;
scanf("%d", &n);
int nCount = 0;
for (int i=1; i<=n; i++)
{
nCount += nFun(i);
}
printf("1+2!+........+n! = %d \n", nCount);
}
//哈 我團隊的也回答了,要不一起采納把 呵呵