mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
bd4f730b16
1900-1999
20 lines
294 B
C++
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;
|
|
}
|