赞
踩
#include<stdio.h>int main(){ int n,sum,i; long fac; scanf("%d",&n); fac=1,sum=0; for(i=1;i<=n;i++) {fac=i*fac; sum=fac+sum; } printf("%d",sum); return 0;}