#include<iostream> #include<cstring> #include<algorithm> #include<set> using namespace std; int f[44],n; signed main() { int i; f[3]=1,f[4]=3; for(i=5;i<=30;i++){ f[i] = f[i-1]*2+ (1<<(i-4)) - f[i-4]; } int x; while(cin>>x,x){cout<<f[x]<<endl;} }
标签:580,int,Critical,Mass,uva,include From: https://www.cnblogs.com/towboa/p/17300114.html