OJ-Problems-Source/HDOJ/1996_autoAC.cpp
2016-08-19 10:57:19 +08:00

20 lines
294 B
C++

#include<stdio.h>
long long save[30]={1};
void work()
{
for(int i=1;i<30;i++)
save[i]=save[i-1]*3;
}
int main()
{
int test,n;
work();
scanf("%d",&test);
while(test--)
{
scanf("%d",&n);
printf("%I64d\n",save[n]);
}
return 0;
}