- C20250174's blog
6
- 2023-2-15 15:05:06 @
#include<bits/stdc++.h>
using namespace std;
long long f[65],g[65];
int main(){
f[1]=1;
g[1]=1;
for(int i=2;i<=20;i++){
g[i]=-g[i-1]*i;
f[i]=f[i-1]+g[i];
}
for(int i=1;i<=20;i++){
cout<<i<<" "<<g[i]<<" "<<f[i]<<endl;
}
return 0;
}