#include<stdio.h>
#include<stdlib.h>
#include<assert.h>
#include<math.h>
int main()
{
int n;
scanf("%d",&n);
int h=0;
int t;
for(int i=1;i<=n;i++)
{
scanf("%d\n",&t);
for(int j=0;j<=t;j++)
{
if(j==0)
h=1;
else
if(j%2!=0)
h=h*2;
else
if(j%2==0)
h=h+1;
}
printf("%d\n",h);
}
return 0;
}
No comments:
Post a Comment