水题。。不解释。
#include<stdio.h>
void main()
{
__int64 t,h,s,h1,s1;
scanf("%I64d",&t);
while(t!=-1)
{
h=1,s=0,h1=0,s1=0;
for(int i=0;i<t;i++)
{
h1=h*3+s*2;
s1=h+s;
h=h1;
s=s1;
}
printf("%I64d, %I64d\n",h,s);
scanf("%I64d",&t);
}
}