题解 | #A-布置会场(I)#
A-布置会场(I)
https://ac.nowcoder.com/acm/problem/14541
#include<iostream>
using namespace std;
int dp[110];
void sc()
{
int n;
scanf("%d",&n);
dp[1]=1;
dp[2]=2;
for(int i=3;i<=n;i++)
{
dp[i]=dp[i-1]+dp[i-2];
}
cout<<dp[n]<<endl;
}
int main()
{
int t;
scanf("%d",&t);
while(t--) sc();
}