Skip to main content
Commonmark migration
Source Link

Brachylog, 15 bytes

:2%:"\/"rm:?jbw

Try it online!

###Explanation

Explanation

:2%                Input mod 2…
   :"\/"rm         …is the index of the element in string "\/",…
          :?j      …element that we juxtapose Input times to itself…
             bw    …and print to STDOUT after removing one slash/backslash

Brachylog, 15 bytes

:2%:"\/"rm:?jbw

Try it online!

###Explanation

:2%                Input mod 2…
   :"\/"rm         …is the index of the element in string "\/",…
          :?j      …element that we juxtapose Input times to itself…
             bw    …and print to STDOUT after removing one slash/backslash

Brachylog, 15 bytes

:2%:"\/"rm:?jbw

Try it online!

Explanation

:2%                Input mod 2…
   :"\/"rm         …is the index of the element in string "\/",…
          :?j      …element that we juxtapose Input times to itself…
             bw    …and print to STDOUT after removing one slash/backslash
Source Link
Fatalize
  • 39.3k
  • 5
  • 70
  • 162

Brachylog, 15 bytes

:2%:"\/"rm:?jbw

Try it online!

###Explanation

:2%                Input mod 2…
   :"\/"rm         …is the index of the element in string "\/",…
          :?j      …element that we juxtapose Input times to itself…
             bw    …and print to STDOUT after removing one slash/backslash