static int F1(int n)
{
if (n == 1)
{
return 1;
}
int result= n * F1(n - 1);
return result;
}
static int F2(int n)
{
if (n == 1)
{
return 1;
}
int result = F2(n - 1) + F1(n);
return result;
}
static void Main(string[] args)
{
Console.Write("请输入所求阶层和:");
int number = Convert.ToInt32(Console.ReadLine());
Console.WriteLine(F2(number ));
}