• Arthur Besse@lemmy.ml
    link
    fedilink
    arrow-up
    41
    ·
    edit-2
    6 months ago

    python -c 'print((61966753*385408813*916167677<<2).to_bytes(11).decode())'

    how?
    $ python
    >>> b"Hello World".hex()
    '48656c6c6f20576f726c64'
    >>> 0x48656c6c6f20576f726c64
    87521618088882533792115812
    $ factor 87521618088882533792115812
    87521618088882533792115812: 2 2 61966753 385408813 916167677
    
    • palordrolap@kbin.run
      link
      fedilink
      arrow-up
      21
      ·
      6 months ago

      perl -le 'use bignum;print+pack"H22",(61966753*385408813*916167677<<2)->to_hex()'

      Alas, Perl doesn’t bignum by default