提交时间:2023-10-04 09:45:23

运行 ID: 104805

#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; f[3]=5; f[4]=9; for(int i=5;i<=n;i++) f[i]=f[i-1]*2; cout<<f[n]%10000; delete[] f; return 0; }