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