Skip to main content
Fixed formatting
Source Link
noodle person
  • 10.3k
  • 1
  • 22
  • 76

Ly, Length 20 / Score 4

Input cannot have 4 characters 0&o0`&o and ` (which I can't figure out how to highlight with the rest of them since it's the markdown character for starting and ending a highlighted string. :)

&ir[0u['`o,]p]"&o"&o

And at a high level, the code reads all input as codepoints, then converts each character to a 0 and as many "increment the top of stack" instructions as is necessary to get to the codepoint value. Then it appends &o to the end to print the entire stack as characters.

&ir                   - read input as codepoints, reverse stack
   [         ]        - loop once for each char on the stack
    0u                - push a "0" onto the stack
      [    ]          - while number is >0
       '`o            - print "`" (the increment instruction)
          ,           - decrement the top of stack
            p         - delete the loop variable from the stack
              "&o"    - push "&o" (print whole stack instruction)
                  &o  - print stack

Try it online!

Ly, Length 20 / Score 4

Input cannot have 4 characters 0&o and ` (which I can't figure out how to highlight with the rest of them since it's the markdown character for starting and ending a highlighted string. :)

&ir[0u['`o,]p]"&o"&o

And at a high level, the code reads all input as codepoints, then converts each character to a 0 and as many "increment the top of stack" instructions as is necessary to get to the codepoint value. Then it appends &o to the end to print the entire stack as characters.

&ir                   - read input as codepoints, reverse stack
   [         ]        - loop once for each char on the stack
    0u                - push a "0" onto the stack
      [    ]          - while number is >0
       '`o            - print "`" (the increment instruction)
          ,           - decrement the top of stack
            p         - delete the loop variable from the stack
              "&o"    - push "&o" (print whole stack instruction)
                  &o  - print stack

Try it online!

Ly, Length 20 / Score 4

Input cannot have 4 characters 0`&o.

&ir[0u['`o,]p]"&o"&o

And at a high level, the code reads all input as codepoints, then converts each character to a 0 and as many "increment the top of stack" instructions as is necessary to get to the codepoint value. Then it appends &o to the end to print the entire stack as characters.

&ir                   - read input as codepoints, reverse stack
   [         ]        - loop once for each char on the stack
    0u                - push a "0" onto the stack
      [    ]          - while number is >0
       '`o            - print "`" (the increment instruction)
          ,           - decrement the top of stack
            p         - delete the loop variable from the stack
              "&o"    - push "&o" (print whole stack instruction)
                  &o  - print stack

Try it online!

Source Link
cnamejj
  • 2.8k
  • 10
  • 11

Ly, Length 20 / Score 4

Input cannot have 4 characters 0&o and ` (which I can't figure out how to highlight with the rest of them since it's the markdown character for starting and ending a highlighted string. :)

&ir[0u['`o,]p]"&o"&o

And at a high level, the code reads all input as codepoints, then converts each character to a 0 and as many "increment the top of stack" instructions as is necessary to get to the codepoint value. Then it appends &o to the end to print the entire stack as characters.

&ir                   - read input as codepoints, reverse stack
   [         ]        - loop once for each char on the stack
    0u                - push a "0" onto the stack
      [    ]          - while number is >0
       '`o            - print "`" (the increment instruction)
          ,           - decrement the top of stack
            p         - delete the loop variable from the stack
              "&o"    - push "&o" (print whole stack instruction)
                  &o  - print stack

Try it online!