Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Revisions

3 of 4
deleted 235 characters in body
AnttiP
  • 8k
  • 16
  • 64

Python 3.8 (pre-release), \$L=80\$, \$N\approx255^{1500}\$

-2 bytes thanks to @Jonathan Allan

f=lambda b,s=0,l=0:b and f(b[1:],255*s+b[0],l+(l!=1500))or s.to_bytes(l,"big")

Try it online!

Python source code can't contain null bytes. This converts the input (bytestring) to base 255 and then back to bytes. After 1500 removes a redundant byte.

AnttiP
  • 8k
  • 16
  • 64

AltStyle によって変換されたページ (->オリジナル) /