题目简介:
Problem Description
Ignatius likes to write words in reverse way. Given a single line of text which is written by Ignatius, you should reverse all the words and then output them.
Input
The input contains several test cases. The first line of the input is a single integer T which is the number of test cases. T test cases follow.
Each test case contains a single line with several words. There will be at most 1000 characters in a line.
Output
For each test case, you should output the text which is processed.
Sample Input
3olleh !dlrowm'I morf .udhI ekil .mca
Sample Output
hello world!I'm from hdu.I like acm.
这道题有多种方法,本来打算将每小段字符放入一个字符串,再调用函数反转顺序放入原来的字符串,再将每一个已经处理过的字符串输出,但在编译器上没问题,到oj上则显示wrong anwser。于是放弃原来的方法,使用了