Skip to main content
3 of 4
added 271 characters in body
ovs
  • 60.6k
  • 3
  • 47
  • 161

05AB1E, 7845 535

Try it online!

This converts the input from base 10 according to 05AB1E's codepage. T is mapped to 29 and ö to 245. Digits larger or equal to the base are allowed and "overflow" into the next digit.
This can be inverted by iterating the digits of the output in reverse:

inverse program:

[D0Q#    "loop while TOS != 0"\
T‰`      "divmod 10"\
5Qi      "if the last digit was 10:"\
 'öˆ24-  "append ö to global array and subtract 24 from TOS"\
ë        "else:"\
 'Tˆ2-   "append T to global array and subtrac 2 from TOS"\
]¯RJ     "after the loop: reverse global array and join"\

Try it online!

ovs
  • 60.6k
  • 3
  • 47
  • 161