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

added 46 characters in body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830

Jelly, (削除) 29 (削除ここまで) (削除) 26 (削除ここまで) 25 bytes

6Øa;3ṗ¤,©Ṛy;L3ḍƊ¡6$ZFs3®y©Ṛy;6$L3ḍƊ¡ZFs3®y

Try it online! Try it online!

How it works

6Øa;3ṗ¤,©Ṛy;L3ḍƊ¡6$ZFs3®y©Ṛy;6$L3ḍƊ¡ZFs3®y Main link. Argument: s (string)
6 Set the return value to space.
 Øa; Append it to "a...z".
 3ṗ¤ Yield the third Cartesian power of [1, 2, 3].
 ,© Pair the results and store the pair in the register.
 The register now holds
 [[[1, 1, 1], ..., [3, 3, 3]], ['a', ... ,'z', ' '].
 Ṛ Reverse the outer array.
 ;L3ḍƊ¡6$;6$ Yield s, possibly with an appendedAppend a space to s...
 L3ḍƊ¡ if the length is divisible by 3.
 y Transliterate according to the mapping to the left.
 ZFs3 Zip/transpose, flatten, split into chunks of length 3.
 ®y Transliterate according to the mapping in the register.

Jelly, (削除) 29 (削除ここまで) (削除) 26 (削除ここまで) 25 bytes

6Øa;3ṗ¤,©Ṛy;L3ḍƊ¡6$ZFs3®y

Try it online!

How it works

6Øa;3ṗ¤,©Ṛy;L3ḍƊ¡6$ZFs3®y Main link. Argument: s (string)
6 Set the return value to space.
 Øa; Append it to "a...z".
 3ṗ¤ Yield the third Cartesian power of [1, 2, 3].
 ,© Pair the results and store the pair in the register.
 The register now holds
 [[[1, 1, 1], ..., [3, 3, 3]], ['a', ... ,'z', ' '].
 Ṛ Reverse the outer array.
 ;L3ḍƊ¡6$ Yield s, possibly with an appended space.
 y Transliterate according to the mapping to the left.
 ZFs3 Zip/transpose, flatten, split into chunks of length 3.
 ®y Transliterate according to the mapping in the register.

Jelly, (削除) 29 (削除ここまで) (削除) 26 (削除ここまで) 25 bytes

6Øa;3ṗ¤,©Ṛy;6$L3ḍƊ¡ZFs3®y

Try it online!

How it works

6Øa;3ṗ¤,©Ṛy;6$L3ḍƊ¡ZFs3®y Main link. Argument: s (string)
6 Set the return value to space.
 Øa; Append it to "a...z".
 3ṗ¤ Yield the third Cartesian power of [1, 2, 3].
 ,© Pair the results and store the pair in the register.
 The register now holds
 [[[1, 1, 1], ..., [3, 3, 3]], ['a', ... ,'z', ' '].
 Ṛ Reverse the outer array.
 ;6$ Append a space to s...
 L3ḍƊ¡ if the length is divisible by 3.
 y Transliterate according to the mapping to the left.
 ZFs3 Zip/transpose, flatten, split into chunks of length 3.
 ®y Transliterate according to the mapping in the register.
missing $ in explanation
Source Link
Erik the Outgolfer
  • 40.8k
  • 5
  • 46
  • 125

Jelly, (削除) 29 (削除ここまで) (削除) 26 (削除ここまで) 25 bytes

6Øa;3ṗ¤,©Ṛy;L3ḍƊ¡6$ZFs3®y

Try it online!

How it works

6Øa;3ṗ¤,©Ṛy;L3ḍƊ¡6$ZFs3®y Main link. Argument: s (string)
6 Set the return value to space.
 Øa; Append it to "a...z".
 3ṗ¤ Yield the third Cartesian power of [1, 2, 3].
 ,© Pair the results and store the pair in the register.
 The register now holds
 [[[1, 1, 1], ..., [3, 3, 3]], ['a', ... ,'z', ' '].
 Ṛ Reverse the outer array.
 ;L3ḍƊ¡6 ;L3ḍƊ¡6$ Yield s, possibly with an appended space.
 y Transliterate according to the mapping to the left.
 ZFs3 ZFs3 Zip/transpose, flatten, split into chunks of length 3.
 ®y ®y Transliterate according to the mapping in the register.

Jelly, (削除) 29 (削除ここまで) (削除) 26 (削除ここまで) 25 bytes

6Øa;3ṗ¤,©Ṛy;L3ḍƊ¡6$ZFs3®y

Try it online!

How it works

6Øa;3ṗ¤,©Ṛy;L3ḍƊ¡6$ZFs3®y Main link. Argument: s (string)
6 Set the return value to space.
 Øa; Append it to "a...z".
 3ṗ¤ Yield the third Cartesian power of [1, 2, 3].
 ,© Pair the results and store the pair in the register.
 The register now holds
 [[[1, 1, 1], ..., [3, 3, 3]], ['a', ... ,'z', ' '].
 Ṛ Reverse the outer array.
 ;L3ḍƊ¡6  Yield s, possibly with an appended space.
 y Transliterate according to the mapping to the left.
 ZFs3 Zip/transpose, flatten, split into chunks of length 3.
 ®y Transliterate according to the mapping in the register.

Jelly, (削除) 29 (削除ここまで) (削除) 26 (削除ここまで) 25 bytes

6Øa;3ṗ¤,©Ṛy;L3ḍƊ¡6$ZFs3®y

Try it online!

How it works

6Øa;3ṗ¤,©Ṛy;L3ḍƊ¡6$ZFs3®y Main link. Argument: s (string)
6 Set the return value to space.
 Øa; Append it to "a...z".
 3ṗ¤ Yield the third Cartesian power of [1, 2, 3].
 ,© Pair the results and store the pair in the register.
 The register now holds
 [[[1, 1, 1], ..., [3, 3, 3]], ['a', ... ,'z', ' '].
 Ṛ Reverse the outer array.
 ;L3ḍƊ¡6$ Yield s, possibly with an appended space.
 y Transliterate according to the mapping to the left.
 ZFs3 Zip/transpose, flatten, split into chunks of length 3.
 ®y Transliterate according to the mapping in the register.
added 1 character in body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830

Jelly, (削除) 29 (削除ここまで) (削除) 26 (削除ここまで) 25 bytes

6Øa;3ṗ¤,©Ṛy;L3ḍƊ¡6$ZFs3®y

Try it online!

How it works

6Øa;3ṗ¤,©Ṛy;L3ḍƊ¡6$ZFs3®y Main link. Argument: s (string)
6 Set the return value to space.
 Øa; Append it to "a...z".
 3ṗ¤ Yield the third Cartesian power of [1, 2, 3].
 ,© Pair the results and store the pair in the register.
 The register now holds
 [[[1, 1, 1], ..., [3, 3, 3]], ['a', ... ,'z', ' '].
 Ṛ Reverse the outer array.
 ;L3ḍƊ¡6 Yield s, possibly with an appended space.
 y Transliterate according to the mapping to the left.
 ZFs3 Zip/transpose, flatten, split into chunks of length 3.
 ®y Transliterate according to the mapping in the register.

Jelly, (削除) 29 (削除ここまで) (削除) 26 (削除ここまで) 25 bytes

6Øa;3ṗ¤,©Ṛy;L3ḍƊ¡6$ZFs3®y

Try it online!

Jelly, (削除) 29 (削除ここまで) (削除) 26 (削除ここまで) 25 bytes

6Øa;3ṗ¤,©Ṛy;L3ḍƊ¡6$ZFs3®y

Try it online!

How it works

6Øa;3ṗ¤,©Ṛy;L3ḍƊ¡6$ZFs3®y Main link. Argument: s (string)
6 Set the return value to space.
 Øa; Append it to "a...z".
 3ṗ¤ Yield the third Cartesian power of [1, 2, 3].
 ,© Pair the results and store the pair in the register.
 The register now holds
 [[[1, 1, 1], ..., [3, 3, 3]], ['a', ... ,'z', ' '].
 Ṛ Reverse the outer array.
 ;L3ḍƊ¡6 Yield s, possibly with an appended space.
 y Transliterate according to the mapping to the left.
 ZFs3 Zip/transpose, flatten, split into chunks of length 3.
 ®y Transliterate according to the mapping in the register.
added 1 character in body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830
Loading
added 13 characters in body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830
Loading
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830
Loading

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