一个高精度问题
#include<iostream>
#include<cstring>
using namespace std;
int main(int argc, char const *argv[])
{
int n , ans[100], len;
bool f = 0;
while(cin >> n)
{
if(f) cout << endl;
f = 1;
memset(ans,0,sizeof(ans));
ans[0] = 1;
len = 1;
for (int i = 0; i < n+1; ++i)
{
for(int j = 0; j < len; j++)
ans[j] *= 2;
for(int j = 0; j < len; j++)
{
if(ans[j] > 9)
{
ans[j+1] += ans[j]/10;
ans[j] %= 10;
}
}
if(ans[len]) len++;
}
ans[0]-=2;
for (int i = len-1; i >= 0; --i)
cout << ans[i];
cout << endl;
}
return 0;
}