swap adjacent bits
Submit
Language is selected by the extension of the file. See the list of supported languages to know the extension of your language.
Problem
Given a number, swap adjacent bits:
For example, 6 -> 0110 ~~> 1001 -> 9
Print the swapped number from 0 to 99 inclusive.
Options
exec is denied
rejudge feature is enabled
now post-mortem time, all source codes will be revealed
Sample input:_
*NOTHING*
Sample output:
0
2
1
3
8
10
9
11
4
6
5
7
12
14
13
15
32
34
33
35
40
42
41
43
36
38
37
39
44
46
45
47
16
18
17
19
24
26
25
27
20
22
21
23
28
30
29
31
48
50
49
51
56
58
57
59
52
54
53
55
60
62
61
63
128
130
129
131
136
138
137
139
132
134
133
135
140
142
141
143
160
162
161
163
168
170
169
171
164
166
165
167
172
174
173
175
144
146
145
147
Ranking
Rank | User | Size | Time | Date | Statistics |
---|
1 | teebee | 28 | 0.0217 | 2024/06/07 08:29:37 | 0B / 14B / 13B |
2 | Dingledooper | 28 | 0.0205 | 2024/06/07 08:41:22 | 0B / 14B / 13B |
3 | tails | 28 | 0.0202 | 2024/06/07 09:35:03 | 0B / 14B / 13B |
4 | fuzzylojik | 28 | 0.0201 | 2024/06/07 11:31:45 | 0B / 14B / 13B |
5 | rotary-o | 28 | 0.0199 | 2024/06/07 12:13:49 | 0B / 16B / 12B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | Dingledooper | 29 | 0.0729 | 2024/06/07 06:21:36 | 0B / 16B / 12B |
2 | teebee | 29 | 0.0602 | 2024/06/07 08:31:10 | 0B / 16B / 12B |
3 | tails | 29 | 0.0593 | 2024/06/07 09:34:26 | 0B / 16B / 12B |
4 | fuzzylojik | 29 | 0.0621 | 2024/06/07 11:31:53 | 0B / 16B / 12B |
5 | rotary-o | 29 | 0.0626 | 2024/06/07 12:13:37 | 0B / 18B / 11B |
6 | Hendrik | 29 | 0.0603 | 2024/06/08 04:49:38 | 0B / 18B / 11B |
7 | Andriamanitra | 32 | 0.0630 | 2024/06/06 20:08:05 | 0B / ?B / ?B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | tails | 32 | 0.0149 | 2024/06/06 16:05:47 | 0B / 15B / 16B |
2 | Dingledooper | 32 | 0.0191 | 2024/06/07 06:22:36 | 0B / 15B / 16B |
3 | teebee | 32 | 0.0153 | 2024/06/07 08:13:58 | 0B / 15B / 16B |
4 | fuzzylojik | 32 | 0.0147 | 2024/06/07 11:29:46 | 0B / 15B / 17B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | teebee | 38 | 0.0298 | 2024/06/07 09:49:21 | 0B / 25B / 10B |
2 | fuzzylojik | 38 | 0.0307 | 2024/06/07 11:25:25 | 0B / 25B / 10B |
3 | xnor (alt) | 38 | 0.0314 | 2024/06/07 16:41:52 | 0B / 22B / 15B |
4 | test | 39 | 0.1037 | 2024/06/08 04:45:08 | 0B / 27B / 9B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | orthoplex | 40 | 0.1547 | 2024/06/06 14:41:11 | 0B / 25B / 12B |
2 | xnor | 40 | 0.0460 | 2024/06/06 15:31:32 | 0B / 25B / 12B |
3 | ovs | 40 | 0.0456 | 2024/06/06 20:13:45 | 0B / 25B / 12B |
4 | Dingledooper | 40 | 0.0479 | 2024/06/07 06:08:57 | 0B / 25B / 12B |
5 | teebee | 40 | 0.0693 | 2024/06/07 08:52:35 | 0B / 25B / 12B |
6 | fuzzylojik | 40 | 0.0458 | 2024/06/07 11:24:47 | 0B / 25B / 12B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | teebee | 40 | 0.0623 | 2024/06/08 05:46:51 | 1B / 17B / 22B |
2 | fuzzylojik | 40 | 0.0290 | 2024/06/14 20:18:58 | 1B / 17B / 22B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | Dingledooper | 37 | 0.0223 | 2024/06/07 06:20:33 | 0B / 20B / 17B |
2 | teebee | 37 | 0.0224 | 2024/06/07 08:20:27 | 0B / 20B / 17B |
3 | fuzzylojik | 37 | 0.0230 | 2024/06/07 11:28:02 | 0B / 20B / 17B |
4 | Hendrik | 38 | 0.0219 | 2024/06/07 05:35:38 | 0B / 23B / 15B |
5 | Andriamanitra | 41 | 0.0217 | 2024/06/06 20:12:01 | 0B / ?B / ?B |
6 | KrausRaus | 106 | 0.0240 | 2024/06/06 19:48:17 | 0B / 62B / 43B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | tails | 14 | 0.1401 | 2024/06/06 18:01:30 | 0B / 6B / 8B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | tails | 52 | 0.0134 | 2024/06/07 09:23:18 | 0B / 25B / 27B |
2 | teebee | 52 | 0.0140 | 2024/06/07 09:43:00 | 0B / 25B / 27B |
3 | fuzzylojik | 53 | 0.0139 | 2024/06/07 11:26:25 | 0B / 26B / 27B |
4 | rotary-o | 53 | 0.0135 | 2024/06/08 00:28:23 | 0B / 30B / 23B |
5 | McBusLuck | 54 | 0.0136 | 2024/06/09 18:49:01 | 0B / 29B / 25B |
6 | AH | 55 | 0.0137 | 2024/06/07 02:10:14 | 0B / ?B / ?B |
7 | _ | 59 | 0.0150 | 2024/06/06 23:41:36 | 0B / ?B / ?B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | teebee | 66 | 0.2056 | 2024/06/07 08:26:23 | 0B / 39B / 25B |
2 | rotary-o | 67 | 0.0604 | 2024/06/07 12:15:37 | 0B / 42B / 23B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | teebee | 90 | 0.0439 | 2024/06/07 08:48:03 | 0B / 60B / 26B |
2 | fuzzylojik | 90 | 0.0356 | 2024/06/07 11:29:01 | 0B / 60B / 26B |
3 | rotary-o | 91 | 0.0439 | 2024/06/07 12:15:50 | 0B / 63B / 24B |
4 | AH | 92 | 0.0455 | 2024/06/07 02:17:51 | 0B / 62B / 26B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | tails | 111 | 0.0193 | 2024/06/07 16:01:13 | 0B / 39B / 59B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | teebee | 33 | 0.0214 | 2024/06/09 23:45:06 | 0B / 12B / 18B |
2 | tails | 33 | 0.0221 | 2024/06/14 09:40:57 | 0B / 12B / 18B |
3 | McBusLuck | 34 | 0.0229 | 2024/06/09 18:43:08 | 0B / 15B / 16B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | tails | 158 | 0.0190 | 2024/06/07 11:51:35 | 0B / 82B / 60B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | teebee | 43 | 0.0074 | 2024/06/08 00:23:26 | 0B / 19B / 23B |
2 | McBusLuck | 64 | 0.0218 | 2024/06/09 21:29:03 | 0B / 31B / 31B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | tails | 35 | 0.0086 | 2024/06/07 09:31:47 | 0B / 23B / 12B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | tails | 64 | 0.0144 | 2024/06/07 10:04:27 | 0B / 34B / 29B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | tails | 16 | 0.0418 | 2024/06/06 18:05:27 | 0B / 6B / 10B |
2 | ovs | 16 | 0.0374 | 2024/06/07 00:25:45 | 0B / 6B / 10B |
3 | orthoplex | 16 | 0.0479 | 2024/06/07 05:44:45 | 0B / 6B / 10B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | tails | 11 | 0.2320 | 2024/06/06 14:07:56 | 5B / 5B / 1B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | Hendrik | 24 | 0.0209 | 2024/06/07 05:09:04 | 0B / 13B / 11B |
2 | Hendrik | 19 | 0.0205 | 2024/06/21 01:45:21 | 0B / 10B / 9B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | tails | 791 | 0.0665 | 2024/06/06 16:59:41 | 0B / 436B / 355B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | tails | 67 | 0.0219 | 2024/06/06 17:40:05 | 52B / 7B / 6B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | teebee | 25 | 0.0296 | 2024/06/07 23:42:11 | 0B / 12B / 12B |
2 | fuzzylojik | 26 | 0.0288 | 2024/06/07 11:32:33 | 0B / 13B / 12B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | teebee | 37 | 2.3265 | 2024/06/07 08:43:31 | 0B / 21B / 15B |
2 | Hendrik | 38 | 2.1444 | 2024/06/07 04:43:55 | 0B / 25B / 11B |
3 | rotary-o | 38 | 2.4899 | 2024/06/07 12:15:11 | 0B / 25B / 11B |
4 | test | 46 | 2.1935 | 2024/06/07 04:20:53 | 0B / 25B / 19B |
Language Ranking_
Rank | Lang | User | Size | Score |
1 | Nibbles | tails | 9 | 10000 |
2 | gs2 | tails | 11 | 8181 |
3 | Atlas | tails | 14 | 6428 |
4 | GolfScript | tails | 16 | 5625 |
5 | Burlesque | Hendrik | 19 | 4736 |
6 | goruby | teebee | 25 | 3600 |
7 | Ruby | teebee | 28 | 3214 |
8 | Perl6 | tails (teebee) | 28 | 3214 |
9 | Ruby2 | Dingledooper | 29 | 3103 |
10 | Xtal | teebee | 30 | 3000 |
11 | K | teebee | 31 | 2903 |
12 | Perl | tails | 32 | 2812 |
13 | Bash (builtins) | teebee | 33 | 2727 |
14 | Groovy | teebee | 34 | 2647 |
15 | BASIC | teebee | 34 | 2647 |
16 | Io | teebee | 34 | 2647 |
17 | dc | tails | 35 | 2571 |
18 | JavaScript | Dingledooper | 37 | 2432 |
19 | Scala | teebee | 37 | 2432 |
20 | Logo | teebee | 37 | 2432 |
21 | Python | teebee | 38 | 2368 |
22 | PARI/GP | teebee | 39 | 2307 |
23 | Python3 | orthoplex | 40 | 2250 |
24 | PHP | teebee | 40 | 2250 |
25 | xgawk | teebee | 41 | 2195 |
26 | bc | teebee | 43 | 2093 |
27 | AWK | tails (teebee) | 43 | 2093 |
28 | Maxima | teebee | 45 | 2000 |
29 | Scheme | teebee | 47 | 1914 |
30 | REBOL | teebee | 47 | 1914 |
31 | Tcl | teebee | 48 | 1875 |
32 | REXX | teebee | 49 | 1836 |
33 | Prolog | teebee | 51 | 1764 |
34 | C | tails | 52 | 1730 |
35 | Common LISP | teebee | 56 | 1607 |
36 | Pike | teebee | 58 | 1551 |
37 | Icon | teebee | 60 | 1500 |
38 | Asymptote | teebee | 63 | 1428 |
39 | m4 | tails | 64 | 1406 |
40 | Java | teebee | 66 | 1363 |
41 | Universal Lambda | tails | 67 | 1343 |
42 | SNOBOL | teebee | 74 | 1216 |
43 | C# | teebee | 90 | 1000 |
44 | sed | tails | 111 | 810 |
45 | make | tails | 158 | 569 |
46 | Lazy-K | tails | 791 | 113 |
return to the top page