#include <iostream> using namespace std; int main() { int n; while (cin >> n) { int i = 1; //最终桃子数目 while (--n) { i = (i + 1) * 2; } cout << i << endl; } return 0; }
#include <iostream> using namespace std; int main() { int n; while (cin >> n) { int i = 1; //最终桃子数目 while (--n) { i = (i + 1) * 2; } cout << i << endl; } return 0; }