1477: 字符串反转

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:203 Solved:51

Description

给定字符串s,要求把s中多于一个的连续空压缩成一个空格,并将连续的非空格字符串倒序打印出来,例如,给定”abc def efg”,打印”cba fed gfe”。

Input

abc def efg

Output

cba fed gfe

Sample Input Copy

abc def efg

Sample Output Copy

cba fed gfe

Source/Category