#include<stdio.h>
int main()
{
_int64 ca[55] = {0,1,2};
int i,n;
for(i = 3; i <=50; i++)
ca[i] = ca[i-1] + ca[i-2];
while(~scanf("%d",&n))
printf("%I64d\n",ca[n]);
return 0;
}
hdu 2046 骨牌铺方格
最新推荐文章于 2022-02-08 13:00:29 发布
#include<stdio.h>
int main()
{
_int64 ca[55] = {0,1,2};
int i,n;
for(i = 3; i <=50; i++)
ca[i] = ca[i-1] + ca[i-2];
while(~scanf("%d",&n))
printf("%I64d\n",ca[n]);
return 0;
}