1 #include<bits/stdc++.h> 2 using namespace std; 3 typedef long long ll; 4 ll dp[35] = {1, 1}; 5 int main() 6 { 7 int T; 8 for(int i = 2; i <= 30; i++) 9 dp[i] = dp[i - 1] + 2*dp[i - 2]; 10 cin >> T; 11 while(T--) 12 { 13 int n; 14 cin >> n; 15 cout << dp[n] << endl; 16 } 17 return 0; 18 }