시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
5 초 | 512 MB | 436 | 338 | 311 | 77.945% |
Given a list of space separated words, reverse the order of the words. Each line of text contains L
letters and W
words. A line will only consist of letters and space characters. There will be exactly one space character between each pair of consecutive words.
The first line of input gives the number of cases, N.
N test cases follow. For each test case there will a line of letters and space characters indicating a list of space separated words. Spaces will not appear at the start or end of a line.
Limits
For each test case, output one line containing "Case #x: " followed by the list of words in reverse order.
3 this is a test foobar all your base
Case #1: test a is this Case #2: foobar Case #3: base your all
Contest > Google > Google's Coding Competitions > Google Code Jam Africa 2010 > Qualification Round B2번