#include<iostream> using namespace std; int main() { int n; while (cin >> n) { int ori = 1; for (int i = 0;i < n-1;i++) { ori = (ori + 1) * 2; } cout << ori << endl; } return 0; }
#include<iostream> using namespace std; int main() { int n; while (cin >> n) { int ori = 1; for (int i = 0;i < n-1;i++) { ori = (ori + 1) * 2; } cout << ori << endl; } return 0; }
转载于:https://www.cnblogs.com/Mered1th/p/10564331.html