Denemek (ve başarısız olmak) küçük oğlumu akşam yemeğini yemeye ikna ederken, ben de ona şarkı söylemeye çalıştım. Bu şarkının tam ortasındaki formül yapısının golf oynamak için iyi bir ödünç verebileceğini fark ettim!
Görev, girdi kabul etmeyen ve aşağıdaki metni üreten bir program veya işlev yazmaktır:
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
Meydan okuma kuralları:
- Metin, işlev çıktısı olarak yazdırılabilir veya döndürülebilir
- Her ayet tek bir boş satırla ayrılır
- İzleyen boşluk boşluğu, mizanpajı değiştirmediği sürece tamamdır (yani baştaki boşluk veya kelimeler arasında boşluk olmaz)
- İzleyen yeni satırlar da sorun değil.
- Baştaki yeni hat yok.
- Tüm diller memnuniyetle karşılanır ve bu kod golftur , bu nedenle her dil için bayt cinsinden en kısa cevap kazanır!
gzip -5
186 bayt sıkıştırır (ve bzip2
ve xz
daha kötü yapmak gibi).