Skip to main content
added 2 characters in body
Source Link
emanresu A
  • 44.2k
  • 5
  • 100
  • 240

Braingolf v0.7, 18 bytes [non-competing]

VR.MUvU&,R{vMR}>&_

Try it online!

Explanation:

VR.MUvU&,R{vMR}>&_  Implicit input of n to stack
VR                  Create new stack then return to main
  .M                Duplicate n and move duplicate to new stack
    U               Replace stack with 1-n, where n is last item on stack
     vU             Replace 2nd stack with 1-n
       &,           Reverse second stack
         R          Return to main
          {   }     Map loop, runs for each item in the stack
           vMR      Move to next stack, move last item to main stack
               >    Cleanup after loop
                &_  Print all items in stack with no delimiter

Braingolf v0.7, 18 bytes [non-competing]

VR.MUvU&,R{vMR}>&_

Try it online!

Explanation:

VR.MUvU&,R{vMR}>&_  Implicit input of n to stack
VR                  Create new stack then return to main
  .M                Duplicate n and move duplicate to new stack
    U               Replace stack with 1-n, where n is last item on stack
     vU             Replace 2nd stack with 1-n
       &,           Reverse second stack
         R          Return to main
          {   }     Map loop, runs for each item in the stack
           vMR      Move to next stack, move last item to main stack
               >    Cleanup after loop
                &_  Print all items in stack with no delimiter

Braingolf v0.7, 18 bytes

VR.MUvU&,R{vMR}>&_

Try it online!

Explanation:

VR.MUvU&,R{vMR}>&_  Implicit input of n to stack
VR                  Create new stack then return to main
  .M                Duplicate n and move duplicate to new stack
    U               Replace stack with 1-n, where n is last item on stack
     vU             Replace 2nd stack with 1-n
       &,           Reverse second stack
         R          Return to main
          {   }     Map loop, runs for each item in the stack
           vMR      Move to next stack, move last item to main stack
               >    Cleanup after loop
                &_  Print all items in stack with no delimiter
Commonmark migration
Source Link

Braingolf v0.7, 18 bytes [non-competing]

VR.MUvU&,R{vMR}>&_

Try it online!

###Explanation:

Explanation:

VR.MUvU&,R{vMR}>&_  Implicit input of n to stack
VR                  Create new stack then return to main
  .M                Duplicate n and move duplicate to new stack
    U               Replace stack with 1-n, where n is last item on stack
     vU             Replace 2nd stack with 1-n
       &,           Reverse second stack
         R          Return to main
          {   }     Map loop, runs for each item in the stack
           vMR      Move to next stack, move last item to main stack
               >    Cleanup after loop
                &_  Print all items in stack with no delimiter

Braingolf v0.7, 18 bytes [non-competing]

VR.MUvU&,R{vMR}>&_

Try it online!

###Explanation:

VR.MUvU&,R{vMR}>&_  Implicit input of n to stack
VR                  Create new stack then return to main
  .M                Duplicate n and move duplicate to new stack
    U               Replace stack with 1-n, where n is last item on stack
     vU             Replace 2nd stack with 1-n
       &,           Reverse second stack
         R          Return to main
          {   }     Map loop, runs for each item in the stack
           vMR      Move to next stack, move last item to main stack
               >    Cleanup after loop
                &_  Print all items in stack with no delimiter

Braingolf v0.7, 18 bytes [non-competing]

VR.MUvU&,R{vMR}>&_

Try it online!

Explanation:

VR.MUvU&,R{vMR}>&_  Implicit input of n to stack
VR                  Create new stack then return to main
  .M                Duplicate n and move duplicate to new stack
    U               Replace stack with 1-n, where n is last item on stack
     vU             Replace 2nd stack with 1-n
       &,           Reverse second stack
         R          Return to main
          {   }     Map loop, runs for each item in the stack
           vMR      Move to next stack, move last item to main stack
               >    Cleanup after loop
                &_  Print all items in stack with no delimiter
Source Link
Mayube
  • 11.7k
  • 2
  • 48
  • 93

Braingolf v0.7, 18 bytes [non-competing]

VR.MUvU&,R{vMR}>&_

Try it online!

###Explanation:

VR.MUvU&,R{vMR}>&_  Implicit input of n to stack
VR                  Create new stack then return to main
  .M                Duplicate n and move duplicate to new stack
    U               Replace stack with 1-n, where n is last item on stack
     vU             Replace 2nd stack with 1-n
       &,           Reverse second stack
         R          Return to main
          {   }     Map loop, runs for each item in the stack
           vMR      Move to next stack, move last item to main stack
               >    Cleanup after loop
                &_  Print all items in stack with no delimiter