Sunday, May 1, 2016

Codeforces 656A - Da Vinci Powers

#include<bits/stdc++.h>
#define i64 long long
#define mx(a,b,c) max(a,max(b,c))
#define mn(a,b,c) min(a,min(b,c))
#define eef else if
#define ff(i,s,e) for(int i=(s); i<e; i++)
#define ff2(i,s,e) for(int i=(s); i>=e; i--)
#define sf scanf
#define pf printf
#define dbug(x) cout<<"x = "<<x<<endl
#define newl cout<<"\n"
#define putcase cout<<"Case "<<++cse<<":"
#define putcase2 cout<<"Case #"<<++cse<<":"
using namespace std;
int main()
{
   // vector<long long>v;
    long long val=1;
    long long v[36]={1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8092, 16184, 32368, 64736, 129472, 258944, 517888, 1035776, 2071552, 4143104, 8286208, 16572416, 33144832, 66289664, 132579328, 265158656, 530317312, 1060634624, 2121269248, 4242538496, 8485076992, 16970153984, 33940307968};

   /* for(int i=0;i<=36; i++){
        v.push_back(val);
        val*=2;
        cout<<v[i]<<" ";
    //pf("%0.lf ",v[i]);
    }*/
int x;
   while(cin>>x){
   cout<<v[x]<<endl;
   }
    return 0;
}

No comments:

Post a Comment