-->
当前位置:首页 > 题库

PROGRAMMING:Flip word order

Luz5年前 (2021-05-10)题库427
Given a string, flip the string. When flipping, the order of characters in the word remains unchanged. For example, if the string is "Hello world", it is flipped to "World Hello". Words are separated by one or more spaces. Note that there may be multiple spaces at the beginning and end of the string.
###Input format:
The input may include multiple lines. Each line represents a string, with the exception of spaces, punctuation is treated like normal letters. You can think that the total number of characters in a line will not exceed 50000, the number of words will not exceed 600, and the length of each word will not exceed 30.
###Output format:
The output includes multiple lines, and each line corresponds to the input line, which is the flipped string.
###Input example:
```in
student. a am I
```
###Output example:
```out
I am a student.
```






answer:If there is no answer, please comment