zengyijian @ 2023-12-09 14:42:51
为什么只对一半?
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
long long sum=0;
cin>>n;
for (int i=1;i<=n;i++)
{
long long nul=1;
for (int j=1;j<=i;j++)
{
nul*=j;
}
sum+=nul;
}
cout<<sum;
return 0;
}
by xiaoshumiao @ 2023-12-09 15:00:03
@zengyijian 此题需要高精度。
by heyx0201 @ 2023-12-09 15:11:46
@zengyijian 高精度高精度