HDOJ 2013 蟠桃记

#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;
}

猜你喜欢

转载自www.cnblogs.com/Mered1th/p/10564331.html