Advertisement
Guest User

Untitled

a guest
Nov 17th, 2021
33
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import time
  2. import struct
  3. import sys
  4.  
  5. n=2**95+123
  6. a=0
  7.  
  8. def encoding(x):
  9. newinit=0
  10. for i in range(95):
  11. if x & 1:
  12. x = (x * 3 + 1) >> 1
  13. s=1
  14. else:
  15. x = x >> 1
  16. s=0
  17. newinit += s << (94 - i)
  18. #or reverse order of bits (which is right?):
  19. #newinit += s << i
  20. return newinit
  21.  
  22. def log(r):
  23. l=0
  24. s=r-1
  25. while s > 0:
  26. s = s >> 1
  27. l=l+1
  28. return l
  29.  
  30. def generator(a,n):
  31. e = encoding(n+a)
  32. a = (((n+a) >> (log(n+a)-95)) ^ e + a) & 340282366920938463463374607431768211455
  33. return [a,e]
  34.  
  35.  
  36. for i in range(100):
  37. #while True:
  38. z = generator(a,n)
  39. a = z[0]
  40. print(z[1])
  41.  
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement