提交时间:2023-11-11 09:58:18
运行 ID: 109707
#include<bits/stdc++.h> using namespace std; long long h[105]; int main(){ int n; cin>>n; h[0]=1; for(int i=1;i<=n;i++){ for(int j=1,z=i-1;j<n,z>0;j++,z--){ h[i]+=j*z; } } cout<<h[n]+1; return 0; }