OJ-Problems-Source/HDOJ/2047_autoAC.cpp
2016-08-19 16:52:35 +08:00

15 lines
271 B
C++

#include<iostream>
using namespace std;
int main()
{
__int64 ans[100] = {0,3,8};
int n;
for (int i = 3; i < 100; i++)
ans[i] = 2 * (ans[i - 1] + ans[i - 2]);
while (cin>>n)
{
cout << ans[n] << endl;
}
return 0;
}