Type: Default 1000ms 256MiB

单词翻转

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

【题目描述】

输入一个句子(一行),将句子中的每一个单词翻转后输出。

【输入】

只有一行,为一个字符串,不超过500个字符。单词之间以空格隔开。

【输出】

翻转每一个单词后的字符串,单词之间的空格需与原文一致。

hello world
olleh dlrow
hello  world
olleh  dlrow

C++5月测数据结构

Not Attended
Status
Done
Rule
OI
Problem
9
Start at
2025-5-30 10:03
End at
2025-5-30 20:03
Duration
10 hour(s)
Host
Partic.
17