Liyan100 @ 2023-10-12 18:10:39
#include<stdio.h>
int main()
{
int n,s=1,i,sum=0;
scanf("%d",&n);
for(i=1;i<=n;i++){
s*=i*1.0;
sum+=s;
}printf("%d",sum);
return 0;
}
by L2YXY @ 2023-10-12 18:12:24
开long long啊
by _coastline_ @ 2023-10-12 18:45:42
用高精度计算出