#include "stdio.h" int main() { int n; int s=0; printf("please input n:"); scanf("%d",&n); for(int s1=1;s1<=n;s1++) { int j=1; for (int i=1;i<=s1;i++) j=j*i; s=s+j; } printf("s=%d",s); }