HDU-2013 蟠桃记

 1 #include <bits/stdc++.h>
 2 #define pb push_back
 3 #define _for(i,a,b) for(int i = (a);i < (b);i ++)
 4 #define INF 0x3f3f3f3f
 5 
 6 using namespace std;
 7 
 8 const int maxn = 5003;
 9 
10 int main()
11 {
12     int N;
13     int tol;
14     while(~scanf("%d",&N))
15     {
16         tol = 1;
17         N--;
18         while(N--)
19             tol=(tol+1)*2;
20         cout << tol << endl;
21     }
22     return 0; 
23 }
原文地址:https://www.cnblogs.com/Asurudo/p/10607769.html