标签:
Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64
Description
Input
Output
Sample Input
Sample Output
1 #include<cstdio> 2 #include<cstring> 3 #include<iostream> 4 5 using namespace std; 6 7 int main() 8 { 9 long long f[50]; 10 f[1]=3;f[2]=8; 11 for(int i=3;i<40;i++) 12 f[i]=2*f[i-1]+2*f[i-2]; 13 int n; 14 while(cin>>n) cout<<f[n]<<endl; 15 }
标签:
原文地址:http://www.cnblogs.com/wsaaaaa/p/4288801.html