#include<stdio.h>
int main()
{
int m,n,age[4]={1,0,0,0},i;
int years;
printf("请输入年份");
scanf("%d",&years);
for(i=1;i<=years;i++)
{
m=age[3];
n=age[2];
age[3]+=age[2];
age[2]=age[1];
age[1]=age[0];
if(i>3&&age[3]>m)
age[0]=m+n;
else
age[0]=m;
}printf("%d",age[0]+age[1]+age[2]+age[3]);
return 0;
}
04-08
1510