huboxuan @ 2024-07-15 23:39:23
#include <bits/stdc++.h>
using namespace std;
int n;
long long s;
int main(){
scanf("%d",&n);
for(int i=1;i<=n;i++){
long long factor=1;
for(int j=1;j<=i;j++)
factor*=j;
s+=factor;
}
printf("%lld",s);
return 0;
}
by Steve_xh @ 2024-07-16 00:15:38
@huboxuan 是
by OldDriverTree @ 2024-07-16 01:00:42
@huboxuan
by luoxiaoran62 @ 2024-07-16 07:55:12
@huboxuan 这题要高精加和高精乘
by Max_hmt @ 2024-07-18 20:07:56
@huboxuan 这题数据较大,long long都爆,除了高精度我还没有想出别的办法
by Xuhappy @ 2024-07-22 16:32:20
@huboxuan 怎么解决的?求