Skip to main content
Commonmark migration
Source Link

##Pyth, 17 bytes

Pyth, 17 bytes

>lQC.e.>bkC+_PtQQ

Explanation:

                      implicit: Q=input
>                     First
  l Q                   len(Q) elements of the
  C .e                  Transpose of enumerated map lambda b,k:
       .>                 Rotate the kth element rightwards by
          b
          k               k.
       C +              Transpose of: Q concatenated to
           _ P t Q        itself reversed without first and last elements.
           Q

Try it here.

##Pyth, 17 bytes

>lQC.e.>bkC+_PtQQ

Explanation:

                      implicit: Q=input
>                     First
  l Q                   len(Q) elements of the
  C .e                  Transpose of enumerated map lambda b,k:
       .>                 Rotate the kth element rightwards by
          b
          k               k.
       C +              Transpose of: Q concatenated to
           _ P t Q        itself reversed without first and last elements.
           Q

Try it here.

Pyth, 17 bytes

>lQC.e.>bkC+_PtQQ

Explanation:

                      implicit: Q=input
>                     First
  l Q                   len(Q) elements of the
  C .e                  Transpose of enumerated map lambda b,k:
       .>                 Rotate the kth element rightwards by
          b
          k               k.
       C +              Transpose of: Q concatenated to
           _ P t Q        itself reversed without first and last elements.
           Q

Try it here.

added 12 characters in body
Source Link
lirtosiast
  • 21.7k
  • 5
  • 53
  • 129

##Pyth, 17 bytes

>lQC.e.>bkC+_PtQQ

Explanation:

                      implicit: Q=input
>                     First
  l Q                   len(Q) elements of the
  C .e                  the transposeTranspose of mappedenumerated enumeratemap lambda b,k:
       .>                 rotateRotate the kth element rightrightwards by
          b
          k               k.
       C +              over transposeTranspose of: Q concatenated to
           _ P t Q        itself reversed without first and last elements.
           Q

Try it here.

##Pyth, 17 bytes

>lQC.e.>bkC+_PtQQ

Explanation:

                      implicit: Q=input
>                     First
  l Q                   len(Q) elements of
  C .e                  the transpose of mapped enumerate
       .>                 rotate the kth element right by
          b
          k               k
       C +              over transpose of: Q concatenated to
           _ P t Q        itself reversed without first and last elements
           Q

Try it here.

##Pyth, 17 bytes

>lQC.e.>bkC+_PtQQ

Explanation:

                      implicit: Q=input
>                     First
  l Q                   len(Q) elements of the
  C .e                  Transpose of enumerated map lambda b,k:
       .>                 Rotate the kth element rightwards by
          b
          k               k.
       C +              Transpose of: Q concatenated to
           _ P t Q        itself reversed without first and last elements.
           Q

Try it here.

added 14 characters in body
Source Link
lirtosiast
  • 21.7k
  • 5
  • 53
  • 129

##Pyth, 17 bytes

>lQC.e.>bkC+_PtQQ

Explanation:

                      implicit: Q=input
>                     First
  l Q                   len(Q) elements of
  C .e                  the transpose of mapped enumerate
       .>                 rotate the kth element right by
          b
          k               k
       C +              over transpose of: Q concatenated to
           _ P t Q        itself reversed without first and last elements
           Q

Try it here.

##Pyth, 17 bytes

>lQC.e.>bkC+_PtQQ

Explanation:

                      implicit: Q=input
>                     First
  l Q                   len(Q) elements of
  C .e                  the transpose of mapped enumerate
       .>                 rotate the kth element right by
          b
          k               k
       C +              over Q concatenated to
           _ P t Q        itself reversed without first and last elements
           Q

Try it here.

##Pyth, 17 bytes

>lQC.e.>bkC+_PtQQ

Explanation:

                      implicit: Q=input
>                     First
  l Q                   len(Q) elements of
  C .e                  the transpose of mapped enumerate
       .>                 rotate the kth element right by
          b
          k               k
       C +              over transpose of: Q concatenated to
           _ P t Q        itself reversed without first and last elements
           Q

Try it here.

added 453 characters in body
Source Link
lirtosiast
  • 21.7k
  • 5
  • 53
  • 129
Loading
Rollback to Revision 2
Source Link
lirtosiast
  • 21.7k
  • 5
  • 53
  • 129
Loading
added 3 characters in body
Source Link
lirtosiast
  • 21.7k
  • 5
  • 53
  • 129
Loading
Post Undeleted by lirtosiast
Fixed
Source Link
lirtosiast
  • 21.7k
  • 5
  • 53
  • 129
Loading
Post Deleted by lirtosiast
Source Link
lirtosiast
  • 21.7k
  • 5
  • 53
  • 129
Loading