提交时间:2023-10-04 09:39:47
运行 ID: 104798
#include<bits/stdc++.h> using namespace std; int main() { int n,*f; cin>>n; f=new int[n+1]; f[1]=1; f[2]=2; for(int i=3;i<=n;i++) f[i]=i+f[i-1]; cout<<f[n]%10000; delete[] f; return 0; }