Fabuła
Widziałeś ten post z 9gag ? Może masz ochotę tworzyć własne zdania. Ale wtedy zdajesz sobie sprawę, że możesz po prostu zagrać w golfa w ciągu pół godziny i nigdy nie będziesz musiał sobie z tym poradzić.
Złożenie
Twój program otrzyma ciąg wejściowy, który zwróci z dodanymi znakami cudzysłowu, jak wyjaśniono poniżej. Standardowe luki są zabronione. Wyjście jako lista wierszy jest dozwolone. Dozwolone są końcowe spacje i puste linie, które nie przerywają wydruku.
Zasady wprowadzania
- Dane wejściowe zawierają tylko drukowalne znaki ASCII.
- Dane wejściowe mogą zawierać spacje. Słowa są z nimi określone.
- Gwarantujemy, że po jednym miejscu nigdy nie będzie następnej przestrzeni.
- Przypadek braku danych wejściowych lub pustego łańcucha nie ma znaczenia.
Reguły produkcji
Jeśli podano jedno słowo, program musi zwrócić ciąg znaków między cudzysłowami.
Jeśli ciąg wejściowy zawiera 2 lub więcej słów, najpierw zwraca początkowe wejście, ale pierwsze słowo jest w cudzysłowie. Następnie w następnym wierszu zwraca początkowe wejście, ale z drugim słowem w cudzysłowie. I tak dalej dla pozostałych słów.
Ogólnie rzecz biorąc, program musi zwrócić tyle wierszy, ile jest słów na wejściu.
Przykłady:
test -> "test"
This is codegolf -> "This" is codegolf
This "is" codegolf
This is "codegolf"
This is a significantly longer, but not the longest testcase -> "This" is a significantly longer, but not the longest testcase
This "is" a significantly longer, but not the longest testcase
This is "a" significantly longer, but not the longest testcase
This is a "significantly" longer, but not the longest testcase
This is a significantly "longer," but not the longest testcase
This is a significantly longer, "but" not the longest testcase
This is a significantly longer, but "not" the longest testcase
This is a significantly longer, but not "the" longest testcase
This is a significantly longer, but not the "longest" testcase
This is a significantly longer, but not the longest "testcase"
Here is an another one -> "Here" is an another one
Here "is" an another one
Here is "an" another one
Here is an "another" one
Here is an another "one"
To jest golf golfowy , więc wygrywa odpowiedź najmniej bajtowa!
"znaków?
'', ‘’lub “”, zamiast ""?