CT27615

Last ribbons of Nandini

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Nandini runs the shed at the coastal hub of Tidewater. Today the books show a list of ribbons, and the numbers must be worked out before sundown. Task: Read a line of space-separated words and print the words in reverse order. Input format: One line with words separated by single spaces. Output format: Print the words in reverse order, single-spaced. Constraints: 1 <= |s| <= 993; s contains lowercase English letters.

Example 1:

Input: vhg mitdm zdiqfyaexitz ck fwjpts dlfaxm nauaqjrbtt
Output: nauaqjrbtt dlfaxm fwjpts ck zdiqfyaexitz mitdm vhg

Example 2:

Input: gzjofuqx unyhixhk uugkdkxmli ehotv s xgemblsvef rjpjsrnozo sfthfuv cof ihfkwwkpdo odclbmfvnsgq lzr cgjdk
Output: cgjdk lzr odclbmfvnsgq ihfkwwkpdo cof sfthfuv rjpjsrnozo xgemblsvef s ehotv uugkdkxmli unyhixhk gzjofuqx

Example 3:

Input: otnbafzvxy yyo oxzqu jjvpdi gwudh jmfvwawgif cvlwyxzck vumrveutlfmf
Output: vumrveutlfmf cvlwyxzck jmfvwawgif gwudh jjvpdi oxzqu yyo otnbafzvxy

Constraints:

1 <= |s| <= 993; s contains lowercase English letters.

Loading...
Test Cases:No test cases
No test cases available.
Last ribbons of Nandini - EASY Coding Problem | CodeTikki