Facebook
From Thundering Teal, 2 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 113
  1. takepow=[]
  2. ans=[]
  3. for i in range(64):
  4.     takepow.insert(i,1<<i)
  5. for i in range(1,64):
  6.     for j in range(i):
  7.         ans.append(takepow[i]|takepow[j])
  8.        
  9. # def printTwoSetBitNums(n) :
  10.     # x = 1
  11.     # while (n > 0) :
  12.     #     y = 0
  13.     #     while (y < x) :
  14.     #         n -= 1
  15.     #         if (n == 0) :
  16.     #             print(takepow[x]|takepow[y])
  17.     #         y += 1
  18.     #     x += 1
  19.    
  20.        
  21. t=int(input())
  22. for i in range(t):
  23.     n=int(input())
  24.     # printTwoSetBitNums(n)
  25.     print(ans[n-1])