ffgg57344 @ 2024-11-17 19:33:34
#include<iostream>
using namespace std;
long sum=1;
long digui(long i)
{
if(i>=1)
{
sum=sum*i;
i=i-1;
i=digui(i);
}
else
{
return sum;
}
}
int main()
{
int a;
long k=0;
cin>>a;
for(int i=1;i<=a;i++)
{
k=k+digui(i);
}
cout<<k;
}
by zhang_jun @ 2024-11-17 19:37:43
by ffgg57344 @ 2024-11-17 19:38:15
@zhang_jun 欧克谢谢