#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; }
[杭电_HDU] 2013
原文:https://www.cnblogs.com/cjdty/p/11408711.html