#include using namespace std; /////////////////// メイン /////////////////// int main () { //////////////////// 入力 //////////////////// int n; cin >> n; //////////////// 出力変数定義 //////////////// double result = 0.0; //////////////////// 処理 //////////////////// vector b(max(2,n+1)); b.at(0) = 4.0; b.at(1) = 12.0; for (int i=2; i<=n; i++) { b.at(i) = b.at(i-1)*19-b.at(i-2)*48; } result = b.at(n); for (int i=0; i