Rock-and-Roll-Gründungsvater Chuck Berry ist heute leider verstorben.
Betrachten Sie den Refrain seines berühmten Liedes " Johnny B. Goode ":
Go, go
Go Johnny go, go
Go Johnny go, go
Go Johnny go, go
Go Johnny go, go
Johnny B. Goode
(Es gibt andere Möglichkeiten , wie dies unterbrochen wurde, aber die oben genannten dienen den Zwecken der Herausforderung.)
Herausforderung
Geben Sie bei einer nicht leeren Kleinbuchstabenfolge az den Refrain von "Johnny B. Goode" mit allen Instanzen der Eingabezeichenfolge aus Gooder goersetzen Sie sie durch die Eingabezeichenfolge, die auf die gleiche Weise in Großbuchstaben geschrieben wurde .
Optional kann ein abschließender Zeilenumbruch folgen. Sonst sollte sich im Refrain nichts ändern.
Wenn zum Beispiel die Eingabe ist,
codemuss die Ausgabe genau seinCode, code Code Johnny code, code Code Johnny code, code Code Johnny code, code Code Johnny code, code Johnny B. Codeodeoptional gefolgt von einem Zeilenumbruch.
Beachten Sie, dass die Groß- und Kleinschreibung aller Wörter mit dem ursprünglichen Refrain übereinstimmt und (trotz fehlendem Rhythmus) das GoIn Goodesowie die einzelnen Wörter Gound ersetzt werden go.
Der kürzeste Code in Bytes gewinnt.
Testfälle
"input"
output
"go"
Go, go
Go Johnny go, go
Go Johnny go, go
Go Johnny go, go
Go Johnny go, go
Johnny B. Goode
"code"
Code, code
Code Johnny code, code
Code Johnny code, code
Code Johnny code, code
Code Johnny code, code
Johnny B. Codeode
"a"
A, a
A Johnny a, a
A Johnny a, a
A Johnny a, a
A Johnny a, a
Johnny B. Aode
"johnny"
Johnny, johnny
Johnny Johnny johnny, johnny
Johnny Johnny johnny, johnny
Johnny Johnny johnny, johnny
Johnny Johnny johnny, johnny
Johnny B. Johnnyode
"fantastic"
Fantastic, fantastic
Fantastic Johnny fantastic, fantastic
Fantastic Johnny fantastic, fantastic
Fantastic Johnny fantastic, fantastic
Fantastic Johnny fantastic, fantastic
Johnny B. Fantasticode
an,c,cath