蟠桃记
#include<iostream>
using namespace std;
int main()
{
int n,i,sum = 1;
while(cin>>n)
{
for(i = 1 ; i < n ; i++)
{
sum = ( sum + 1 ) * 2;
}
cout << sum <<endl;
sum = 1;
}
}
蟠桃记
#include<iostream>
using namespace std;
int main()
{
int n,i,sum = 1;
while(cin>>n)
{
for(i = 1 ; i < n ; i++)
{
sum = ( sum + 1 ) * 2;
}
cout << sum <<endl;
sum = 1;
}
}