#include<iostream>
using namespace std;
int main()
{
int i, n, x;
cin >> n;
for (i = 1, x = 1; i < n; i++)
x = (x + 1) * 2;
cout << x;
return 0;
}
猴子吃桃问题C++
最新推荐文章于 2024-08-25 06:11:42 发布
#include<iostream>
using namespace std;
int main()
{
int i, n, x;
cin >> n;
for (i = 1, x = 1; i < n; i++)
x = (x + 1) * 2;
cout << x;
return 0;
}