このチャレンジの目標は、入力を受け取り、その入力を文の順序を逆にして出力することです。入力例:
Hello friend. What are you doing? I bet it is something I want to do too!
出力例:
I bet it is something I want to do too! What are you doing? Hello friend.
例からわかるように、プログラムは疑問符、感嘆符、およびピリオドを処理する必要があります。各文には句読点があり、次の文の前にスペースがあると仮定できます。末尾のスペース/改行は、読み取り可能な限り問題ありません。最短のコードが優先されます。
幸運を!
編集:文に引用符や括弧がないと仮定することができますが、コードでこれらの両方を処理できるようにすると、-5バイトの括弧/引用符の出力例が得られます:
"Hello, " she said. (I didn't know what she was talking about.) --> (I didn't know what she was talking about.) "Hello, " she said.
"Hello!" she said. (I hesitated. How should I respond? This is too much!) I responded, "Hi there. How are you? What is your cat's name?" without thinking any more about it.