什么地方错了
#include <iostream> using namespace std; int main() { int t,n,f[19],a,b,s,j,k,i; cin>>t; f[0]=1; for (i=1;i<=18;i++) { if (i%2==0) { a=1; b=1; for (j=1;j<=(i/2);j++) { a=a*j; b=b*2;} f[i]=a*b; } if (i%2!=0) { a=1; for (j=1;j<=i;j++) a=a*j; f[i]=a/f[i-1]; } } for (i=0;i<t;i++) { cin>>n; s=0; for (j=0;j<=n;j++) s=s+f[j]; cout<<s<<endl; } return 0; }