En essayant (et en échouant) de persuader mon fils en bas âge de manger son dîner, j'ai essayé de lui chanter. Au milieu de cette chanson, j'ai réalisé que la structure de la formule pouvait se prêter au codage du golf!
La tâche consiste à écrire un programme ou une fonction qui n'accepte aucune entrée et produit le texte suivant:
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
Règles du challenge:
- Le texte peut être imprimé ou retourné comme sortie de fonction
- Chaque vers est séparé par une seule ligne vide
- Les espaces de fin sont acceptables tant qu'ils ne modifient pas la mise en forme (donc pas d'espaces de début ni d'espaces supplémentaires entre les mots)
- Les retours à la ligne sont également acceptables.
- Pas de nouvelles lignes principales.
- Toutes les langues sont les bienvenues. Il s’agit de code-golf . La réponse la plus courte en octets pour chaque langue est gagnante!
gzip -5
s’agisse pas d’un langage de programmation) , il est compressé à 186 octets ( bzip2
et xz
semble faire pire).