#include <iostream>
using namespace std;
int Count(int x)
{
int sum;
if(x == 1) return 1; //递归函数需要终止
else
sum = (Count(x - 1) + 1) * 2;
return sum;
}
int main()
{
int n;
while(cin >> n)
{
if(1 < n && n < 30)
cout << Count(n) << endl;
}
}
杭电ACM 2013 蟠桃记
最新推荐文章于 2020-09-24 00:18:18 发布