Sementara berusaha (dan gagal) telah membujuk putra bayi saya untuk makan malam, saya mencoba menyanyi untuknya. Pertengahan jalan melalui lagu ini saya menyadari struktur formula mungkin cocok untuk kode golf!
Tugasnya adalah menulis program atau fungsi yang tidak menerima input dan menghasilkan teks berikut:
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
Aturan tantangan:
- Teks dapat dicetak atau dikembalikan sebagai keluaran fungsi
- Setiap ayat dipisahkan oleh satu baris kosong
- Trailing whitespace OK selama tidak mengubah tata letak (jadi tidak ada spasi putih terkemuka atau spasi ekstra di antara kata-kata)
- Mengejar baris baru juga OK.
- Tidak ada baris baru.
- Semua bahasa disambut, dan ini adalah kode-golf , jadi jawaban terpendek dalam byte untuk setiap bahasa menang!
gzip -5
kompres ke 186 byte (dan bzip2
dan xz
tampaknya lebih buruk).