Logo
(追記) (追記ここまで)

4072번 - Words 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB85266260279.947%

문제

A nasty virus has infected my computer. Its effect has been to attack all my text files and reverse every word in them. Your job in this problem is to write the code to restore my text files to their original condition.

As far as the virus was concerned, a word was any sequence of characters that ended with a space or an end of line character. You will see what I mean when I tell you that the first line in one of my files was:

Get ready for the New Zealand Programming Contest.

The virus turned this into:

teG ydaer rof eht weN dnalaeZ gnimmargorP .tsetnoC

See how it included the full stop with ‘Contest’ and put it before the letters?

입력

Input will consist of a number of lines, each containing up to 250 characters. Words will be separated by single spaces, i.e. not by tabs, double spaces or other characters. Words may be of any length. Input will be terminated by a line containing a single #.

출력

Output will consist of one line for each line of input. In the output line, each word (as defined in paragraph 2 above) in the input line will be reversed.

제한

예제 입력 1

teG ydaer rof eht weN dnalaeZ gnimmargorP tsetnoC no .ht41
I like ice-cream.
#

예제 출력 1

Get ready for the New Zealand Programming Contest on 14th.
I ekil .maerc-eci 

힌트

출처

ICPC > Regionals > South Pacific > South Pacific Region > New Zealand Programming Contest > NZPC 2004 Z번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /