...そして私のコード友達のための本当のゴルフ。
これは、1年前のXKCDコミックに基づいたチャレンジで、ほとんどがトースト(コミックの最初のパロディ)から成り立っていますが、わずかなバリエーションがあります。
あなたの仕事は、friends
(標準入力または関数引数を介して)入力としてコミックからトーストの前半(すべてを含む)を取得し、正確なテキストを出力(または返す)するプログラム(または関数)を書くことです後半。無効な入力を処理する必要はありません。標準の抜け穴が適用され、バイト単位の最短コードが優先されます。
例
他の場所からトーストをコピーしたくない人を助けるために、ここにすべてを入力と出力に分けて示します。
Input: Champagne for my real friends
Output: and real pain for my sham friends!
Input: Pseudopods for my real friends
Output: and real pods for my pseudo-friends!
Input: Petticoats for my real friends
Output: and real coats for my petty friends.
Input: Loosestrife for my real friends
Output: and real strife for my loose friends!
Input: Ladybugs for my real friends
Output: and real bugs for my lady friends!
Input: Single-payer for my real friends
Output: and RealPlayer for my single friends.
Input: Tumbleweeds for my real friends
Output: and real weed for my Tumblr friends!
Input: Fauxhawks for my real friends
Output: and real hawks for my faux friends!
Input: Platonic solids for my real friends
Output: and real solids for my platonic friends!
Single-payer
。
Single-payer
代わりにタイプミスがあると思いますSingle-player
。