“21天好习惯”第一期-21 #include<stdio.h> int main() { int N,i=1,s=0,a=1; scanf("%d",&N); while(i<=N) { a*=i; s+=a; i++; } printf("%d",s); return 0; }