Reverse lines and words
Submit
Language is selected by the extension of the file. See the list of supported languages to know the extension of your language.
Problem
Take a multi-line string as input. Your job is to print it, with the lines and words reversed. A word is defined as a series of characters without 0x20 (Space).
--Erik the Golfer
Options
exec is denied
rejudge feature is enabled
now post-mortem time, all source codes will be revealed
Sample input:_
This is line 1.
This is line 2.
This is line 3.
This is line 4.
This is line 5.
Sample output:
5. line is This
4. line is This
3. line is This
2. line is This
1. line is This
Sample input:_
This is a testcase so that you won't hardcode your solution that easily. Y'
know, 'cause ppl constantly hardcode their "solutions" here in anagol. Please,
DO NOT do that!
Sample output:
that! do NOT DO
Please, anagol. in here "solutions" their hardcode constantly ppl 'cause know,
Y' easily. that solution your hardcode won't you that so testcase a is This
Sample input:_
If you can hardcode two solutions, you can't hardcode THREE!
MWAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHA!
7 3 222 1847 44 6 +-*/%^sqrt
Sample output:
+-*/%^sqrt 6 44 1847 222 3 7
MWAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHA!
THREE! hardcode can't you solutions, two hardcode can you If
Ranking
Rank | User | Size | Time | Date | Statistics |
---|
1 | mitchs | 30 | 0.0366 | 2017/02/12 00:36:00 | 0B / 17B / 11B |
2 | xsot | 30 | 0.0366 | 2017/02/13 11:15:08 | 0B / 17B / 11B |
3 | Histocrat | 33 | 0.0340 | 2017/02/23 13:38:38 | 0B / 18B / 14B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | xsot | 33 | 0.2634 | 2017/02/13 11:15:31 | 0B / 17B / 14B |
2 | mitchs | 33 | 0.2172 | 2017/02/14 23:36:26 | 0B / 17B / 14B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | tails | 28 | 0.0338 | 2017/02/14 09:04:18 | 0B / 16B / 11B |
2 | mitchs | 29 | 0.0324 | 2017/02/15 00:26:49 | 0B / 18B / 9B |
3 | %20 | 36 | 0.0502 | 2017/02/20 19:43:02 | 0B / 15B / 18B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | mitchs | 64 | 0.0985 | 2017/02/12 12:48:28 | 0B / 38B / 24B |
2 | hallvabo | 64 | 0.0861 | 2017/02/12 19:02:34 | 0B / 38B / 25B |
3 | xsot | 64 | 0.1002 | 2017/02/13 10:53:28 | 0B / 38B / 24B |
4 | mitchs (alt) | 67 | 0.0964 | 2017/02/12 12:55:29 | 0B / 34B / 29B |
5 | rolf | 73 | 0.1250 | 2017/02/12 00:18:03 | 0B / 35B / 34B |
6 | joey | 137 | 0.1209 | 2017/02/20 13:10:47 | 0B / ?B / ?B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | mitchs | 52 | 0.2000 | 2017/02/12 12:56:51 | 0B / 26B / 22B |
2 | xsot | 52 | 0.2529 | 2017/02/13 11:42:30 | 0B / 28B / 21B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | kaki | 83 | 0.3358 | 2017/02/18 00:02:45 | 0B / 56B / 24B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | tanon | 36 | 1.4589 | 2017/02/12 00:37:54 | 0B / 30B / 3B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | tails | 69 | 0.3723 | 2023/01/04 17:19:39 | 0B / 17B / 51B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | nu | 56 | 0.0322 | 2017/02/14 23:57:53 | 0B / 29B / 27B |
2 | tails | 56 | 0.0321 | 2017/02/17 12:39:32 | 0B / 29B / 27B |
3 | kotatsugame | 83 | 0.0320 | 2017/02/11 18:53:25 | 0B / 47B / 35B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | henkma | 55 | 0.0329 | 2017/02/14 22:40:47 | 0B / 30B / 20B |
2 | dianne | 57 | 0.0340 | 2017/02/18 10:42:35 | 0B / 30B / 24B |
3 | lynn | 57 | 0.0335 | 2017/02/19 07:02:35 | 0B / ?B / ?B |
4 | Hendrik | 60 | 0.0392 | 2017/02/13 19:05:37 | 0B / 49B / 10B |
5 | _ | 60 | 0.0327 | 2017/02/14 18:27:15 | 0B / 49B / 10B |
6 | kaki | 60 | 0.0343 | 2017/02/17 23:58:20 | 0B / 49B / 10B |
7 | petercommand | 60 | 0.0369 | 2017/03/07 20:18:18 | 0B / ?B / ?B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | tails | 41 | 0.0341 | 2017/02/13 11:56:44 | 0B / 7B / 28B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | eban | 44 | 0.0497 | 2022/02/08 14:29:28 | 0B / 21B / 20B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | eban | 44 | 0.0349 | 2022/02/09 20:35:16 | 0B / 22B / 16B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | tails | 37 | 0.0169 | 2017/02/13 14:10:32 | 0B / 16B / 16B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | tails | 138 | 0.0392 | 2017/02/13 12:34:11 | 0B / 68B / 49B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | tails | 25 | 0.0879 | 2017/02/17 15:59:21 | 0B / 3B / 19B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | ludo | 70 | 0.4275 | 2017/02/25 03:25:19 | 0B / 42B / 25B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | mitchs | 7 | 0.2705 | 2017/02/11 07:31:53 | 1B / 0B / 4B |
2 | whio | 7 | 0.2468 | 2017/02/11 07:45:04 | 1B / 0B / 4B |
3 | tails | 7 | 0.3452 | 2017/02/13 10:40:09 | 1B / 0B / 4B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | tails | 401 | 0.0449 | 2020/01/23 17:31:47 | 0B / 219B / 182B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | rotary-o | 61 | 9.4644 | 2017/02/23 02:40:53 | 0B / 30B / 31B |
2 | Hendrik | 78 | 9.3206 | 2017/02/22 01:06:58 | 0B / 50B / 25B |
3 | a | 117 | 9.2441 | 2017/02/16 13:17:20 | 0B / ?B / ?B |
Language Ranking_
Rank | Lang | User | Size | Score |
1 | Nibbles | tails | 5 | 10000 |
2 | gs2 | mitchs | 7 | 7142 |
3 | Burlesque | Hendrik | 12 | 4166 |
4 | goruby | mitchs | 19 | 2631 |
5 | GolfScript | tails (the test data aside, nice problem.) | 19 | 2631 |
6 | wake | tails | 25 | 2000 |
7 | Perl | tails | 28 | 1785 |
8 | Ruby | mitchs | 30 | 1666 |
9 | Ruby2 | xsot | 33 | 1515 |
10 | Vim | udioica | 33 | 1515 |
11 | Perl6 | tanon | 36 | 1388 |
12 | Bash (builtins) | tails | 37 | 1351 |
13 | sed | tails | 41 | 1219 |
14 | jq | eban | 44 | 1136 |
15 | Bash | eban | 44 | 1136 |
16 | Python3 | mitchs | 52 | 961 |
17 | Haskell | henkma | 55 | 909 |
18 | C | nu | 56 | 892 |
19 | Scala | rotary-o | 61 | 819 |
20 | Python | mitchs | 64 | 781 |
21 | Atlas | tails | 69 | 724 |
22 | JavaScript | FizzyTea | 70 | 714 |
23 | R | ludo | 70 | 714 |
24 | Brainfuck | mitchs | 73 | 684 |
25 | Scheme | kaki | 83 | 602 |
26 | make | tails | 138 | 362 |
27 | Lazy-K | tails | 401 | 124 |
return to the top page