标签:
#include<stdio.h>
int main()
{
int a[56]={0,1,1,2,4};
for(int i=5;i<56;i++)
a[i]=a[i-1]+a[i-3]+1;
int num;
//scanf("%d\n",&num);
while(~scanf("%d",&num))
{
//int n;
//scanf("%d",&n);
printf("%d\n",a[num]);
}
}
标签:
原文地址:http://www.cnblogs.com/mycapple-zgs-111411/p/4619626.html