fork download
  1. n = int(input())
  2. print(n.to_bytes((n.bit_length() + 7) // 8, 'big'))
Success #stdin #stdout 0.02s 8736KB
stdin
3405691582
stdout
b'\xca\xfe\xba\xbe'