标签:
http://acm.hdu.edu.cn/showproblem.php?pid=2013
1 #include<iostream> 2 #include<stdio.h> 3 #include<math.h> 4 using namespace std; 5 6 int main() 7 { 8 int n; 9 while(cin>>n) 10 { 11 int sum=1,x; 12 for(int i=1;i<n;i++) 13 { 14 x=2*sum+2; 15 sum=x; 16 } 17 printf("%d\n",x); 18 } 19 return 0; 20 }
标签:
原文地址:http://www.cnblogs.com/xuesen1995/p/4495478.html