fork(1) download
  1.  
  2. import math
  3. t=input()
  4. while t :
  5. n=input()
  6. x=n
  7. a=0
  8. while x>1:
  9. a+=1
  10. x/=2
  11. print 2*(n-2**(int)(math.log(n,2)))+1,
  12. print (int)(math.log(n,2))
  13. print 2*(n-2**a)+1,
  14. print a
  15. t-=1
Success #stdin #stdout 0.01s 7740KB
stdin
1
562949953421311
stdout
-1 49
562949953421311 48