Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

Commonmark migration
Source Link

#MATL , 13 bytes

MATL , 13 bytes

1Y2tn:!to~!+)

Try it online!

1Y2 % Predefined string literal: 'AB···Z'
tn: % Duplicate, number of elements, range: gives [1, 2, ···, 26]
! % Transpose into a column vector
to~! % Duplicate and transform into [0, 1, 0, 1, ···, 1] using modulo 2
+ % Addition with broadcast. Gives 2D numeric array
) % Index (modularly) into string. Implicitly display.

#MATL , 13 bytes

1Y2tn:!to~!+)

Try it online!

1Y2 % Predefined string literal: 'AB···Z'
tn: % Duplicate, number of elements, range: gives [1, 2, ···, 26]
! % Transpose into a column vector
to~! % Duplicate and transform into [0, 1, 0, 1, ···, 1] using modulo 2
+ % Addition with broadcast. Gives 2D numeric array
) % Index (modularly) into string. Implicitly display.

MATL , 13 bytes

1Y2tn:!to~!+)

Try it online!

1Y2 % Predefined string literal: 'AB···Z'
tn: % Duplicate, number of elements, range: gives [1, 2, ···, 26]
! % Transpose into a column vector
to~! % Duplicate and transform into [0, 1, 0, 1, ···, 1] using modulo 2
+ % Addition with broadcast. Gives 2D numeric array
) % Index (modularly) into string. Implicitly display.
added 8 characters in body
Source Link
Luis Mendo
  • 106.7k
  • 10
  • 139
  • 382

#MATL, 13 bytes

1Y2tn:!to~!+)

Try it online!

1Y2 % Predefined string literal: "AB···Z"'AB···Z'
tn: % Duplicate, number of elements, range: gives [1, 2, ···, 26]
! % Transpose into a column vector
to~! % Duplicate and transform into [0, 1, 0, 1, ···, 1] using modulo 2
+ % Addition with broadcast. Gives 2D numeric array
) % Index (modularly) into string. Implicitly display.

#MATL, 13 bytes

1Y2tn:!to~!+)

Try it online!

1Y2 % Predefined string literal: "AB···Z"
tn: % Duplicate, number of elements, range: gives [1 2 ··· 26]
! % Transpose into a column vector
to~! % Duplicate and transform into [0 1 0 1 ··· 1] using modulo 2
+ % Addition with broadcast. Gives 2D numeric array
) % Index (modularly) into string. Implicitly display.

#MATL, 13 bytes

1Y2tn:!to~!+)

Try it online!

1Y2 % Predefined string literal: 'AB···Z'
tn: % Duplicate, number of elements, range: gives [1, 2, ···, 26]
! % Transpose into a column vector
to~! % Duplicate and transform into [0, 1, 0, 1, ···, 1] using modulo 2
+ % Addition with broadcast. Gives 2D numeric array
) % Index (modularly) into string. Implicitly display.
added 365 characters in body
Source Link
Luis Mendo
  • 106.7k
  • 10
  • 139
  • 382

#MATL, 13 bytes

1Y2tn:!to~!+)

Try it online!

1Y2 % Predefined string literal: "AB···Z"
tn: % Duplicate, number of elements, range: gives [1 2 ··· 26]
! % Transpose into a column vector
to~! % Duplicate and transform into [0 1 0 1 ··· 1] using modulo 2
+ % Addition with broadcast. Gives 2D numeric array
) % Index (modularly) into string. Implicitly display.

#MATL, 13 bytes

1Y2tn:!to~!+)

Try it online!

#MATL, 13 bytes

1Y2tn:!to~!+)

Try it online!

1Y2 % Predefined string literal: "AB···Z"
tn: % Duplicate, number of elements, range: gives [1 2 ··· 26]
! % Transpose into a column vector
to~! % Duplicate and transform into [0 1 0 1 ··· 1] using modulo 2
+ % Addition with broadcast. Gives 2D numeric array
) % Index (modularly) into string. Implicitly display.
Source Link
Luis Mendo
  • 106.7k
  • 10
  • 139
  • 382
Loading

AltStyle によって変換されたページ (->オリジナル) /