Skip to main content
1 of 3
SnoringFrog
  • 1.8k
  • 19
  • 13

#Labyrinth, 12 bytes

Program:

!!!(!(!(!@@@

Output:

000-1-1-1

The last two @ aren't technically a comment, but they're just as useless. However, it's kind of inevitable since it's a necessary character to exit a Labyrinth.

Explanation:

Labyrinth's stack contains an infinite number of 0's at the bottom.

!: pops the top of the stack and prints its decimal representation

(: decrements the top of the stack by 1

@: terminates the program

Because this program is a single line, most of Labyrinth's rules for deciding what direction to go are irrelevant; it just moves down the line.

SnoringFrog
  • 1.8k
  • 19
  • 13