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

#05AB1E , (削除) 124 (削除ここまで) 119 bytes

05AB1E , (削除) 124 (削除ここまで) 119 bytes

#05AB1E , (削除) 124 (削除ここまで) 119 bytes

05AB1E , (削除) 124 (削除ここまで) 119 bytes

Source Link
Kevin Cruijssen
  • 136.2k
  • 14
  • 154
  • 394

#05AB1E, (削除) 124 (削除ここまで) 119 bytes

.•RYÁ Wö∍®Ø’áÅÚ)’Òü•'x¡TMvy„€Û‚1⁄2#NĀèTM"ÿ€»‹é€‡€€ ÿs,€ƒ Iƒ§€–¡ ́€Ä-"©¶y"ƒ« I€\€–€... ÿ.".a¶¶}®19£"€á-and€Ç€\€ ̧€μ... ̧€„¡ ́€‡€á."J

Try it online.

Explanation:

.•RYÁ Wö∍®Ø’áÅÚ)’Òü•
 # Push compressed string "socialistxtrade unionistxjew"
 'x¡ '# Split it on "x": ["socialist","trade unionist","jew"]
 TM # Convert each word to Titlecase: ["Socialist","Trade Unionist","Jew"]
v # Loop `y` over each of these strings:
 y # Push string `y`
 „€Û‚1⁄2 # Push dictionary string "first then"
 # # Split on spaces: ["first","then"]
 N # Push the index of the loop
 Ā # Truthify it (0 remains 0; every other number becomes 1)
 è # Use it to index into the list
 TM # Titlecase it
 "ÿ€»‹é€‡€€ ÿs,€ƒ Iƒ§€–¡ ́€Ä-"
 # Push dictionary string "ÿ they came for the ÿs, and I did not speak out-"
 # where the "ÿ" are automatically filled with the strings at the top of the stack
 © # Save it in the register (without popping)
 ¶ # Push a newline "\n"
 y # Push string `y` again
 "ƒ« I€\€–€... ÿ." # Push dictionary string "because I was not a ÿ."
 # where the "ÿ" is automatically filled again with the string
 .a # Sentence case it: "because" becomes "Because"
 ¶¶ # Push two newline characters "\n\n"
} # After the loop:
® # Push the string from the register:
 # "Then they came for the Jews, and I did not speak out-"
 19£ # Only leave the first 19 characters: "Then they came for "
"€á-and€Ç€\€ ̧€μ... ̧€„¡ ́€‡€á."
 # Push dictionary string "me-and there was no one left to speak for me."
J # Then join everything on the stack together (and output implicitly)

See this 05AB1E tip of mine (sections How to use the dictionary? and How to compress strings not part of the dictionary?) to understand why:

  • .•RYÁ Wö∍®Ø’áÅÚ)’Òü• is "socialistxtrade unionistxjew"
  • „€Û‚1⁄2 is "first then"
  • "ÿ€»‹é€‡€€ ÿs,€ƒ Iƒ§€–¡ ́€Ä-" is "ÿ they came for the ÿs, and I did not speak out-"
  • "ƒ« I€\€–€... ÿ." is "because I was not a ÿ."
  • "€á-and€Ç€\€ ̧€μ... ̧€„¡ ́€‡€á." is "me-and there was no one left to speak for me."

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