View Code of Problem 73

 #include<iostream>
 using namespace std;
 int main()
 {
 	int t=1,n,i;//t为1,逆推 
 	cin>>n;
 	for( i=0;i<n-1;i++)//循环n-1次 
 	   t=(t+1)*2;// 将剩下的桃子吃掉一半,又多吃一个 
 	   
 	   cout<<t<<endl;
 	
  } 

Double click to view unformatted code.


Back to problem 73