1196:踩方格
#include <iostream>
#include <cstdio>
using namespace std;
int a[21];
int main()
{
int n,i;
scanf("%d",&n);
a[1]=3;
a[2]=7;
for(i=3;i<=n;i++)
{
a[i]=a[i-1]*2+a[i-2];
}
printf("%d",a[n]);
}
标签:std,int,题解,1196,方格,include
来源: https://www.cnblogs.com/Tiger-2010-12-3/p/16250417.html