幼い息子に夕食を食べさせようと(そして失敗して)試みながら、私は彼に歌ってみました。この歌の途中で、定型的な構造がゴルフをコーディングするのに役立つかもしれないことに気付きました!
タスクは、入力を受け入れずに次のテキストを生成するプログラムまたは関数を作成することです。
There's a hole in the bottom of the sea
There's a hole in the bottom of the sea
There's a hole, there's a hole
There's a hole in the bottom of the sea
There's a log in the hole in the bottom of the sea
There's a log in the hole in the bottom of the sea
There's a hole, there's a hole
There's a hole in the bottom of the sea
There's a bump on the log in the hole in the bottom of the sea
There's a bump on the log in the hole in the bottom of the sea
There's a hole, there's a hole
There's a hole in the bottom of the sea
There's a frog on the bump on the log in the hole in the bottom of the sea
There's a frog on the bump on the log in the hole in the bottom of the sea
There's a hole, there's a hole
There's a hole in the bottom of the sea
There's a wart on the frog on the bump on the log in the hole in the bottom of the sea
There's a wart on the frog on the bump on the log in the hole in the bottom of the sea
There's a hole, there's a hole
There's a hole in the bottom of the sea
There's a hair on the wart on the frog on the bump on the log in the hole in the bottom of the sea
There's a hair on the wart on the frog on the bump on the log in the hole in the bottom of the sea
There's a hole, there's a hole
There's a hole in the bottom of the sea
There's a fly on the hair on the wart on the frog on the bump on the log in the hole in the bottom of the sea
There's a fly on the hair on the wart on the frog on the bump on the log in the hole in the bottom of the sea
There's a hole, there's a hole
There's a hole in the bottom of the sea
There's a flea on the fly on the hair on the wart on the frog on the bump on the log in the hole in the bottom of the sea
There's a flea on the fly on the hair on the wart on the frog on the bump on the log in the hole in the bottom of the sea
There's a hole, there's a hole
There's a hole in the bottom of the sea
There's a smile on the flea on the fly on the hair on the wart on the frog on the bump on the log in the hole in the bottom of the sea
There's a smile on the flea on the fly on the hair on the wart on the frog on the bump on the log in the hole in the bottom of the sea
There's a hole, there's a hole
There's a hole in the bottom of the sea
チャレンジルール:
- テキストは印刷されるか、関数出力として返されます。
- 各詩は単一の空行で区切られています
- レイアウトを変更しない限り、末尾の空白は問題ありません(したがって、先頭の空白や単語間の余分なスペースはありません)
- 末尾の改行も問題ありません。
- 主要な改行はありません。
- すべての言語が歓迎され、これはcode-golfなので、各言語のバイト単位の最短回答が勝ちます!
gzip -5
それを186バイトに圧縮します(そしてbzip2
、xz
さらに悪くなるようです)。