#include <iostream>
using namespace std;
int main()
{
int n;
while (cin >> n)
{
__int64 Lu[51];
Lu[0] = 3;
Lu[1] = 6;
Lu[2] = 6;
for (int i = 3; i < n; i++)
Lu[i] = Lu[i - 1] + 2 * Lu[i - 2];
cout << Lu[n - 1] << endl;
}
return 0;
}
HDU ACM 11 2045 RPG难题
最新推荐文章于 2021-09-08 21:33:13 发布